I don't know why it's not detecting it automatically when you visit Other Locations, but you can set that up manually. I don't know if this is the simplest choice, however, it's just the one that I know.
-
Launch a terminal from the applications menu. Run the following command to install the necessary packages for mounting SMB network drives:
sudo apt install cifs-utils
-
Choose a location in your system where to mount the network drive. For example, if you want it under Documents create a new folder there, called "Lab" or whatever name you decide, but please don't use spaces; it just makes things more difficult.
-
You now need to edit a configuration file to instruct the system to search for and mount this network drive automatically. The file in question is located at:
/etc/fstab
.Note that you need admin privileges to edit this file; use one of these methods to navigate and open it with the right permissions: Three ways to edit files and folders as root.
Add a new line at the bottom of the file that looks something like this:
//IP/directory /home/zenzen/Documents/Lab cifs credentials=/home/zenzen/.smbcredentials,uid=1000,gid=1000,x-systemd.automount 0 0
Make sure to change the username to your own, and other details like the right location of the drive and/or the credentials file.
-
The credentials file referred by
credentials=/home/zenzen/.smbcredentials
does not exist by default, you need to create it yourself. The exact name and location doesn't matter; just make sure it matches whatever you put in/etc/fstab
. Prefixing the filename with a dot will make it hidden by default (you can toggle hidden files visibility in the file manager settings).The contents of this file should be the username and password used to connect to the drive.
username= password=
-
Finally, to prevent any unwanted access to this file with sensitive details, lock it down so that only your user can modify it:
chmod 600 /home/zenzen/.smbcredentials
You might need to restart for changes to take effect. If all went well, the next time you access the Documents/Lab folder, it will automatically connect to the network drive.