Frequently Asked Questions

« Previous
How do I access my work-computer from home?
Next »
How do I use Eduroam, the wireless network, in Windows?

windows ubuntu macos xibo network zenworks android storage

25. How do I mount SMB share in Linux?

See also: How do I mount my home directory or shared storage at HNAS?
See also: How do I install Ubuntu?
See also: How do I access PCFS over SMB using smbclient?

Command line

  1. If you are running Ubuntu make sure the package cifs-utils is installed by running the command:

    apt-get install cifs-utils

  2. To mount an SMB-share on the command line in Linux, first create a directory where to mount the share: example like this:

    mkdir /mnt/myfiles

  3. Then mount:

    mount -t cifs -o domain=USER,username=jny25782,password=XXX '//$/jny25782' /mnt/myfiles

    If you want to be prompted for a password try this instead where the password is not specified.

    mount -t cifs -o domain=USER,username=jny25782 '//$/jny25782' /mnt/myfiles

  4. Newer versions of Ubuntu do not fall back to older versions of the SMB protocol. Then please specify what version you want to use. In this example Ubuntu 17.10 is used connecting to the Hitachi NAS (HNAS) service or Argos (Rudbeck-IT file server) at the university.

    mount -t cifs //$/ /mnt/myfiles -o domain=USER,username=jny25782,password=XXX,vers=2.0


To do this permanently add the following line (as a root user) in the file /etc/fstab

  1. First check your uid (uidNumber) as your normal user:

    id -u

  2. Then enter this line as an administrator in the file /etc/fstab.

    //$/jny25782 /mnt/myfiles cifs domain=USER,username=jny25782,password=XXX,uid=1000,iocharset=utf8 0 0

  3. Now the normal user with id 1000 should be able to access the files in /mnt/myfiles

Temporarily on an Ubuntu desktop

  1. Start the file browser and open Connect to server...
  2. Enter the path:

  3. Enter your credentials


This entry mount.smb.linux was last modified 2019-06-13


This documentation is covered by GNU Free Documentation License. 12 ms