![]() ![]() If you no longer wish to use the mounted directory or keep it available for users, you can simply unmount it using the unmount command. For instance, type: sudo mount -a Unmount SMB Shares on Ubuntu Lastly, run the mount command on the terminal to share the mounted directory with other users on the same network. Save the changes and exit the text editor. Next, add the following lines of information in the same file: //WIN_SHARE_IPaddress/$shared_name /mnt/winshare cifs credentials=/etc/cifs-credentials,file_mode=0755,dir_node=0755 0 0 Make sure to write your machine’s IP Address. Specifically, type: //172.20.10.10/share /media/share cifs vers=3.0,credentials=/.examplecredentials Next, add the following details at the end of the file: Lastly, determine the IP Address of the machine for the mounted share using the ip command. For example: sudo chmod 400 /root/.examplecredentials For instance, execute the command as shown below: sudo vim /root/.examplecredentialsĬopy the following contents in your newly created file: username=example_usernameĬonfigure the access permissions of this secured file. Specifically, type: sudo nano /root/.examplecredentialsĪlternatively, you can use the vim editor. To create a secured file, simply place “.” before the file name. Make sure to replace the path with your desired path name.Īfter that, create a secured credential file using the text editor of your choice. ![]() In other words, the content should be accessible by other machines in the same network. Execute the following command to update all the existing utilities and dependencies: sudo apt-get update & sudo apt upgradeĪfter that, create a directory where you will place all the files and folders you wish to share. Head over to the command prompt by pressing “Ctrl + Alt+ T”. To get started with the mounting, the first step is to update the system. For this step, use the command: man mount Mount SMB Shares on Ubuntu Update the System Alternatively, you can access the manual from the terminal as well. -O: Used to limit the set of filesystemsįor a detailed guide, check out its manual page. ![]() -T: Gets info on alternative fstab if available.-t: Sets the filesystem type of the mounted device.-a: Automatically mounts all filesystems indicated in /etc/fstab.-h: Displays all other options for the mount command.–l: Enables users to add labels on mount output.Here are a few options that you can use with the mount command: ![]() Sudo mount Mount Options in the Mount Command The basic mount command syntax looks something like this: mount However, there is no need for configured mount directory or credential setting at this stage. Prerequisitesįor this tutorial, you will need a root account or a machine with the sudo privilege. In this article, you will cover how to set up SMB protocol on Ubuntu, along with its various sharing mechanisms. In return, the SMB server sends a response to accept the connection request and establish a two-way communication channel. The SMB protocol works in the following way: the client sends the SMB request to the server to initiate the connection. Originally developed by IBM, SMB is developed to provide authenticated access to printers and files to the nodes in the same network.Īlso known as the Response-Request Protocol, SMB operates at the Application Layer and relies on TCP/IP port 445 to communicate over the network. In addition, it is also useful for sharing files among the machines connected to the same LAN. SMB or Server Message Block is a well-known protocol used in the client-server model to transfer files. Finding a method on how to mount SMB shares on Ubuntu can help users with transferring the files over the same LAN. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |