Skip to content
Menu
Marius Serbanica – Tech Blog
  • My Tech Blog
  • About me
  • Contact Me
  • Curriculum Vitae
  • Projects
  • Current Projects List
  • Certifications
  • Home Lab
  • Self-Hosted
  • Linux Cheat Sheet
  • Linux Commands
  • Privacy Policy
  • Site Map
Marius Serbanica – Tech Blog
April 1, 2023April 1, 2023

Mounting a NAS (Network Attached Storage) device on Linux

To use your NAS and make it accessible over your entire network, you will have to configure it properly so it can be added and mounted in various systems around your home network.

We’re not going to talk about NAS configurations but we are going to go through how to mount your NAS to a Linux OS permanently.

Add an entry to the /etc/fstab file. This file contains information about the file systems that are mounted at boot time. Here are the steps to add an entry for your NAS device:

  • Open the /etc/fstab file in a text editor with root privileges:
sudo nano /etc/fstab

  • Add a new line to the file with the following syntax:
//<NAS_IP_address>/<share_name> <mount_point> cifs username=<username>,password=<password> 0 0

  • Replace <NAS_IP_address>, <share_name>, <mount_point>, <username>, and <password> with the same values you used in the mount command in the previous answer. For example:
//192.168.1.100/backup /home/user/nas_mount cifs username=user,password=password 0 0

  • Save the file and exit the text editor.
  • Test the fstab entry by running the following command:
sudo mount -a

After completing these steps, your NAS device should be mounted automatically every time you boot your Linux system.

Share on Social Media
x facebook linkedin

2 thoughts on “Mounting a NAS (Network Attached Storage) device on Linux”

  1. abL says:
    December 3, 2023 at 10:15 pm

    I’m getting
    sudo umount -a
    umount: /run/user/1000: target is busy.
    umount: /snap/snapd/19457: target is busy.
    umount: /sys/fs/cgroup: target is busy.
    umount: /: target is busy.
    umount: /run: target is busy.
    umount: /dev: target is busy.

    Reply
    1. admin says:
      December 7, 2023 at 7:35 am

      try – mount -a.

      Reply

Leave a Reply Cancel reply

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

Join my LinkedIn Network.

Recent Posts

  • Kubernetes cluster. Why and how
  • Installing GNU-World on ircu2
  • Replacing Cloudflare Tunnel with Tailscale on a VPS
  • KASM – My main workspace RBI
  • Transforming a Mini PC into a Powerful Home Network Hub / Router/ Firewall with OPNsense

Archives

  • February 2025
  • January 2025
  • October 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023

Categories

  • How-To
  • Tech Industry
  • Tech, but personal
  • Tutorials

Recent Comments

  1. IRC Lamer on Installing GNU-World on ircu2
  2. severus2231 on Transforming a Mini PC into a Powerful Home Network Hub / Router/ Firewall with OPNsense
  3. admin on Mounting a NAS (Network Attached Storage) device on Linux
  4. abL on Mounting a NAS (Network Attached Storage) device on Linux
  5. Alin R on Cleaning up your Linux OS.
Social Media
Find me on social media
Facebook Twitter Instagram LinkedIn

©2025 Marius Serbanica – Tech Blog