Home > Articles > Details

How to Mount a Disk in Ubuntu

If the CIFS utility is asking you for a Username and Password every time you attempt to mount -a (mount a NAS in Ubuntu) then make sure that you haven't included a period (.) thinking that it is a comma (,).

If you want to mount another disk space in Linux Ubuntu follows instructions below:
1. cd etc/
2. sudo apt-get install cifs-utils
2. sudo nano fstab
3. Under "/swap.img" type the following:
   //IPAddressOfYourDisk/FolderName /FolderYouWantToBindTheDiskTo cifs guest,uid=100,iocharset=utf8 0 0 #There is a comma next to "guest"
- guest should be replaced with user credentials to log into the Disk Space.
4. sudo mount -a #To finally mount the settings pasted in fstab or sudo mount -av #To see more information about the mount

[NB] If you have followed the code above and you get the error that says "mount: /etc/fstab: parse error at line 6 -- ignored"


Please Login to see the rest of the answer
Answer: Remove the spaces between guest,uid=100,inocharset=utf8 0 0


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Mark said:

Jack, the error that says that "The Host is down" is due to your Network Attached Devices nor supporting SMB 3.0, it shows that the protocol is different from what the CIFS is using to mount. In order to resolve this, you need to add version=1.0 to your FSTAB file then do another sudo mount -a this will work.

Posted On: February 06, 2022 16:43:04 PM
Jack said:

I got an error saying "mount error(112): Host is down" Any idea why? I pinged the host is responding.

Posted On: January 29, 2022 11:39:44 AM
Admin said:

@Mark make sure you do: sudo apt-get install cifs-utils

Posted On: January 10, 2022 16:34:26 PM
Mark said:

I got an error saying bad option; for several filesystem (e.g. nfs, cifs) you might need a /sbin/mount

Posted On: January 10, 2022 16:29:30 PM

© 2022 - ErnesTech - Privacy