Mount samba file share on linux machine: Difference between revisions

From AcrodusWiki
(Created page with "Use the following commands to mount a samba file share onto a local linux machine sudo mount -t cifs //samba.acrodus.uk/sharing /media/alex/smb -o username=alex Notes- cifs stands for common internet file system and is a protocol that is a subset of smb (server message block). -o option allows to specify parameters for the authentication, this can be a seperate file if required, example below username=target_user_name password=target_user_password domain=domain The...")
 
No edit summary
 
Line 1: Line 1:
Use the following commands to mount a samba file share onto a local linux machine
Use the following commands to mount a samba file share onto a local linux machine


<pre>
sudo mount -t cifs //samba.acrodus.uk/sharing /media/alex/smb -o username=alex
sudo mount -t cifs //samba.acrodus.uk/sharing /media/alex/smb -o username=alex
</pre>


Notes-
Notes-
Line 9: Line 11:
-o option allows to specify parameters for the authentication, this can be a seperate file if required, example below
-o option allows to specify parameters for the authentication, this can be a seperate file if required, example below


<pre>
username=target_user_name
username=target_user_name
password=target_user_password
password=target_user_password
domain=domain
domain=domain
</pre>


The file share can also be mounted at boot by editing the /etc/fstab with the below
The file share can also be mounted at boot by editing the /etc/fstab with the below


<pre>
<file system>: //<IP Address of Server>/<Share on Server>
<file system>: //<IP Address of Server>/<Share on Server>
<mount point>: <Mount Point>
<mount point>: <Mount Point>
<type>: cifs
<type>: cifs
<options>: credentials=<Credentials Filename>
<options>: credentials=<Credentials Filename>
</pre>

Latest revision as of 10:58, 23 November 2024

Use the following commands to mount a samba file share onto a local linux machine

sudo mount -t cifs //samba.acrodus.uk/sharing /media/alex/smb -o username=alex

Notes-

cifs stands for common internet file system and is a protocol that is a subset of smb (server message block).

-o option allows to specify parameters for the authentication, this can be a seperate file if required, example below

username=target_user_name
password=target_user_password
domain=domain

The file share can also be mounted at boot by editing the /etc/fstab with the below

<file system>: //<IP Address of Server>/<Share on Server>
<mount point>: <Mount Point>
<type>: cifs
<options>: credentials=<Credentials Filename>