Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Configure Network Filesystem in Linux

In a networked environment, it is often necessary to share files and directories between multiple systems. Network Filesystem (NFS) is a protocol that allows file sharing over a network. NFS allows a system to access files and directories on another system as if they were local. This is particularly useful in a Linux environment where multiple systems need to access shared resources.

NFS provides a convenient way to share files and directories between Linux systems. It allows for centralized storage and easy access to files from multiple systems. NFS also provides security features to control access to shared resources.

To configure NFS in a Linux environment, follow these steps:

  1. Install NFS server:

    • On Ubuntu or Debian-based systems, use the following command:

      sudo apt-get install nfs-kernel-server
    • On Red Hat or CentOS-based systems, use the following command:

      sudo yum install nfs-utils
  2. Create a directory to be shared:

    sudo mkdir /shared_directory
  3. Configure NFS exports: Open the /etc/exports file using a text editor:

    sudo nano /etc/exports

    Add the following line to allow access to the shared directory:

    /shared_directory *(rw,sync,no_subtree_check)

    Save the file and exit the text editor.

  4. Start the NFS server:

    • On Ubuntu or Debian-based systems, use the following command:

      sudo systemctl start nfs-kernel-server
    • On Red Hat or CentOS-based systems, use the following command:

      sudo systemctl start nfs-server
  5. Configure NFS client:

    • On Ubuntu or Debian-based systems, install the NFS client package:

      sudo apt-get install nfs-common
    • On Red Hat or CentOS-based systems, install the NFS client package:

      sudo yum install nfs-utils
  6. Mount the shared directory on the client system:

    sudo mount <server_ip>:/shared_directory /mnt

    Replace <server_ip> with the IP address of the NFS server.

  7. Access the shared files: The shared files and directories can now be accessed on the client system under the /mnt directory.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.