Mounting and unmounting filesystems
In order for the computer to access files, the filesystem must be mounted. The mount
command will show you what is mounted (usable) on your system at the moment.
I created my own /data
folder and mounted a new HDD into it:
Figure 3.4 – A command showing what filesystem is mounted on /data
To mount your filesystem with a command, just run the following:
mount -t ext4 /dev/mapper/cs-home /data
In order to have it automatically mounted on reboot, you have to define this entry in /etc/fstab
.
If you want to mount a CD-ROM, just run the following command:
mount -t iso9660 /dev/cdrom /mnt/cdrom
For more detailed information, consult the mount
man page or run mount
with the -h
flag to get assistance.
The cd
command can be used to traverse the newly accessible filesystem through the mount point you just created after mounting.
How to unmount the filesystem
Using the umount
command and specifying...