Posted On October 9, 2021

Linux SMB Mount via Command Line Bash Shell

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Linux SMB Mount via Command Line Bash Shell
  1. Install smbfs to include these functions
    1. smbmount
    2. smbunmount
  2. Here is a demonstration of smbmount to mount an SMB share called “testshare” from a machine called “smbserver”:
    [root@linux1]# smbmount "\\\\smbserver\\testshare" -U username -c 'mount /testshare -u 500 -g 100' Added interface ip=192.168.0.11 bcast=192.168.255.255 nmask=255.255.0.0 Got a positive name query response from 192.168.1.11 ( 192.168.1.11 ) Password: ************* Domain=[KIMCONNECT] OS=[Unix] Server=[Samba 2.0.3] security=user
  3. Check the mounts
    root@linux1]# mount                                                                                                    
    /dev/hda2 on / type ext2 (rw)
    none on /proc type proc (rw)
    none on /dev/pts type devpts (rw,mode=622)
    //smbserver/testshare on /testshare type smbfs (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How To Use NXLog On A Windows Client

Step 1: Setup Server - Install a log aggregation server is out of scope of…

Manual Compile of NGINX on CentOS 7

Summary:Normal NGINX that has been installed from repositories does not forward raw TCP packets. Since…

How to expand volume of a linux virtual machine residing in a ESXi host

1. Power off VM2. Expand volume size3. Power on VM4. Confirm new volume size# fdisk…