In this section, we are going to learn about the mount
command. To mount a file system onto the file system tree, use the mount
command. This command will instruct the kernel to mount the file system found on a particular device. There is a mount point in the tree for each partition that is mounted.
Besides having a terminal open, make sure you have necessary files and directories present to mount
- We are going to use the
mount
command to mount the file system. Then, we are going to use thero
andnoexec
options to mount:
$ mount -t ext4 /directorytobemounted /directoryinwhichitismounted -o ro,noexec
$ mount -t ext4 /directorytobemounted /directoryinwhichitismounted -o defaults