Disk space statistics is an important thing to know
The linux file system combines all media disks into a single virtual directory.
Which means, if a new media disk is to be used, it should be placed in the virtual directory, which is called mounting.
In newer version of Linux, thijcls mounting process occurs automatically.
The $mount lists media devices currently mounted to the system.
From above image
- device_filename on /mount_point type filesystem_type (access_status)
So basically, the $mount command provides 4 pieces of information:
- The device filename of the media
- The mount point in the virtual directory
- The filesystem type
- The access status of the mounted media
This shows that device file sda2 is mounted on root directory / which has a ext4 file type with access status inside braces.
$mount -t type device directory
This mounts a given device of given type to the given directory
The filesystem type under which the device was formatted
Eg. vfat for windows, ntfs for later windows, iso9880 for cd-rom filesystem etc
the location of the media device
the location in the virtual directory (mount point)
Eg. to manually mount the USB memory stick at device /dev/sbd1 at location /media/disk, the command would be:
*$mount -t vfat /dev/sbd1 /media/disk
After it is mounted, the root user has full access to it.
Some additional option:
The -o option allows mounting file system with comma separated list of addional option such as;
- ro : Read only
- rw : Read / write
- user: allows ordinary user to mount
- check = none : mount without performing integrity test
- loop : mounts a file
The $umount command unmounts a file
Eg. $ umount /home/rich/mnt