Home » Linux » Mounting network file systems and retrieving files in Linux

Mounting network file systems and retrieving files in Linux

Last updated May 18, 2021

In this article, 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.

Prerequisites

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 and noexec 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 host, and also between two remote hosts. Run the following command to transfer files from a remote host to our local host:

$ scp from_host_name:filename /local_directory_name

How it works

  • We used the ext4 file system. In the mount command, we first specified which directory we wanted to mount, followed by the directory in which we will mount it with the ro and noexec options.
  • We mounted the directories using the default options.
  • We used the scp command to copy files from a remote host to the local host.

Related Posts

Creating a lame utility HTTP server in Linux Operating System

In this article, we will discuss the cURL tool in Linux. The cURL tool is used for transferring the data from or to a server. It supports many protocols, and http is one of them. cURL is used to transfer the data from URL. It has so many tricks to offer, such as http...

Finding binary dependencies in Linux Operating System

In this article, we are going to check the executable. We will find out which string is present in it by using the string command.PrerequisitesBesides having a terminal open, make sure you have a binary present in your directory.Find dependencies First, we...

Capturing network traffic headlessly in Linux Operating System

In this article, we are going to learn how to capture traffic. We are going to capture network traffic with a packet sniffer tool called tcpdump. This tool is used to filter or capture TCP/IP packets that are transferred or received over a network.PrerequisitesBesides...

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

ten + 2 =

Follow Us

Our Communities

More on Linux

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!