The command “id -u” returns the user id of the current user. I can do this by adding the “uid” option in the mount command, like this: To fix the permissions issues, you can specify them in the mount command.įor example, as I have only one user on my system, I just need to tell the mount command to set my username as the owner. In most cases, you can’t even create new files. You can read all the files but can’t modify or delete them. The mount is done with sudo (mandatory), so all the permissions are given to root.I’ll explain how to fix this point with the last method (next part). It will be disconnected on the next reboot, and won’t be reconnected automatically. The network share is only temporarily accessible.You’ll quickly realize that they are two major issues with this solution: Sudo mount -o user=admin //192.168.222.150/partage shareĪs you can see, it works directly, and I can see the content of my network drive with: Then the basic syntax for the mount command looks like:Ī basic command example may look like this:īut in my case, I need to specify a different username, so I added an option: It’s not necessarily a good idea if you have several users, but it’s fine for the example. You can create the folder wherever you want, I chose to create it in my home folder: If you are a Windows user, you may not be used to this, but the first step is to create a new folder, to which we’ll map the network drive. On Linux, network shares are “mounted” to a local folder, that must be created beforehand. Sudo apt APT, or Advanced Package Tool, is a software utility used to manage the installation, removal. So, start by installing the tools to access your network share (most likely, you need “cifs-utils”): You might need something else depending on the type of network share (“nfs-utils” for example), but the procedure is the same. Mount is installed by default, but this doesn’t necessarily include all the file systems you need.įor example, I’m using a Samba share for this tutorial, requiring the “cifs-utils” package, which is not installed by default on Ubuntu Server. The traditional method to map a network drive on Ubuntu (and any Linux system), is to use the “mount” command, available by default on most distributions. Method 2: From a terminal (manual & temporary) But if you are interested, I have 2 other methods for you, using the command line instead. And if you saved the bookmark, you probably won’t need to do it frequently. That’s it, mapping a network drive on Ubuntu Desktop isn’t more complicated than that. And if you selected “Remember forever” in the login form, you won’t need to type your user and password ever again.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |