Linux Mount Drive: Difference between revisions
Jump to navigation
Jump to search
Line 94: | Line 94: | ||
==References== | ==References== | ||
{| | |||
| valign="top" | | |||
* [https://askubuntu.com/questions/583909 How do I check where devices are mounted?] | * [https://askubuntu.com/questions/583909 How do I check where devices are mounted?] | ||
* [https://unix.stackexchange.com/questions/178638 Eject or Safely Remove vs Unmount] | * [https://unix.stackexchange.com/questions/178638 Eject or Safely Remove vs Unmount] | ||
* [https://askubuntu.com/questions/46588 Auto mount NTFS partitions] | |||
* [https://askubuntu.com/questions/164926 Auto mount at startup] | |||
* [https://unix.stackexchange.com/questions/387129 Safely remove drive] | * [https://unix.stackexchange.com/questions/387129 Safely remove drive] | ||
* [https://unix.stackexchange.com/questions/35508 Eject USB drives] | * [https://unix.stackexchange.com/questions/35508 Eject USB drives] | ||
Line 103: | Line 106: | ||
* [https://manpages.ubuntu.com/lsblk.8 lsblk] | * [https://manpages.ubuntu.com/lsblk.8 lsblk] | ||
* [https://manpages.ubuntu.com/df.1 df] | * [https://manpages.ubuntu.com/df.1 df] | ||
| valign="top" | | |||
* [https://www.raspberrypi.org/forums/viewtopic.php?t=22957 Mount a NTFS External USB Hard drive] | |||
|} |
Revision as of 09:10, 6 June 2020
mount df lsblk findmnt ─────────────────────────────────────────────── findmnt / TARGET SOURCE FSTYPE OPTIONS / /dev/mmcblk0p2 ext4 rw,noatime |
lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 3.7T 0 disk ├─sda1 8:1 0 128M 0 part └─sda2 8:2 0 3.7T 0 part mmcblk0 179:0 0 59.6G 0 disk ├─mmcblk0p1 179:1 0 256M 0 part /boot └─mmcblk0p2 179:2 0 59.4G 0 part / |
Mount A Drive
mount ─────────────────────────────────────────────── lsblk mkdir /mnt/chorke mount /dev/sda2 /mnt/chorke/ ls -lah /mnt/chorke/ |
unmount ─────────────────────────────────────────────── lsblk umount /mnt/chorke/ ls -lah /mnt/chorke/ rm -rf /mnt/chorke/ |
Safely Remove
udisks2 (new system) ─────────────────────────────────────────────── lsblk udisksctl unmount -b /dev/sda1 udisksctl power-off -b /dev/sda |
udisks (old system) ─────────────────────────────────────────────── lsblk udisks --unmount /dev/sda1 udisks --detach /dev/sda |
Good To Know
─────────────────────────────────────────────── apt update apt install lshw apt install eject apt install gdisk apt install hdparm apt install ntfs-3g apt install udisks2 cat /proc/mounts mount|grep ^/dev ls -la /mnt/ mount -a |
─────────────────────────────────────────────── udisksctl unmount -b /dev/sda1 lsblk -o NAME,FSTYPE,UUID cat /proc/self/mounts hdparm -N /dev/sda ls -la /dev/sda* eject /dev/dvd fdisk -l mount -l df -aTh mount lshw |