Mount SMB/CIFS Network Shares¶
Commands and configurations for connecting, temporarily mounting, and permanently automounting local SMB/CIFS network shares.
Connecting via Dolphin (GUI)¶
- Open the Dolphin file manager.
- Press Ctrl + L to focus the address bar.
- Type
smb://ipand press Enter. - Enter your Samba username and password when prompted.
- Right-click the connected folder in the main view and select Add to Places to pin it permanently to your sidebar.
Permanent Mount via /etc/fstab (CLI)¶
- Install the required CIFS utilities:
- Create a local directory for the mount point:
- Create a secure file to store your credentials:
- Add your Samba login details to the file:
- Restrict permissions on the credentials file:
- Edit your filesystem table:
- Append this line to the bottom of the file (update the IP, share name, and your Linux username):
//ip/<share_name> /mnt/network_drive cifs credentials=/home/<your_username>/.smbcredentials,uid=1000,gid=1000,iocharset=utf8,x-systemd.automount 0 0
- Reload the system daemon and mount the drive: