Mounting network file systems and retrieving files
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.
Getting ready
Besides having a terminal open, make sure you have necessary files and directories present to mount
How to do it...
- We are going to use theÂ
mount
command to mount the file system. Then, we are going to use theÂro
andnoexec
options to mount:
$ mount -t ext4 /directorytobemounted /directoryinwhichitismounted -o ro,noexec
- We can mount the device with default options too. Run the following command to mount a device using the default options:
$ mount -t ext4 /directorytobemounted /directoryinwhichitismounted -o defaults
- The
scp
command is used to securely transfer files between two hosts. We can transfer files from our localhost to a remote...