Managing disks and partitions with the Linux Shell

April 2017





Here are the key controls for managing disks & partitions on Linux
  • mount: Displays the list of mounted filesystems
  • mount device dir: Mounts a file system (from a peripheral device) on a directory
  • mount-t msdos device dir: Mount a DOS partition
    • df: Displays the space used/free on the mounted file systems.
    • -h stand for sizes in KB
    • -h (Linux & BSD) stand for the most significant sizes of the unit
  • fdisk device: Changing the partition (MBR)
  • pdisk device: Changing the partitioning (Apple Partition Map -> Mac OS X & BSD)
  • disklabel device: Changing the partitioning (for BSD disklabel)
  • newfs device: Formatting a partition
  • mkfs device: Formatting a partition
    • /etc/fstab: Correspondence between devices and mount points and the mounting options,


Note that: /etc/fstab is also used to auto mount partition at startup.




Related FAQ:

Related


Published by jak58. Latest update on December 15, 2010 at 10:14 AM by jak58.
This document, titled "Managing disks and partitions with the Linux Shell," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).