By liran bh | 5/16/2016 | Linux Commands & Scripts

Useful mounting options


In Embedded linux development process it is very common to create a mount points from target to host and between hosts. some useful commands

mounting NFS file system:

the nfs server name is NFSSERVER and its IP address is: 192.168.20.34
the server directory is /opt/files and it is configured with permissions on the server (/etc/exports file). also the client added the server IP and name to its /etc/hosts file.

# mkdir /mnt/nfsserver
# mount -t nfs NFSSERVER:/opt/files /mnt/nfsserver


if you cant configure the server name on /etc/hosts file you should use the IP address:

#mount -t nfs 192.168.20.34:/opt/files /mnt/nfsserver


mounting Windows system

the windows workstation is WINWS with ip: 192.168.20.70
make sure SAMBA daemon(service) is running on your linux system - depends on your distribution.

# mkdir /mnt/windows
# mount -t smbfs -o username=winuser,password=pass //192.168.20.70/linux_files /mnt/windows


NOTES:

  • If you get an error try cifs instead of smbfs 
  • sometimes (IT reasons) it is working only with the server name (not IP address) and sometimes only with IP so try both if you have problems

Loop mount image file

# mount -o loop file.img /mnt/image


mount USB disk on key

# mount /dev/sda1 /mnt/usb


for more options and situations see man pages


{{CommentsModel.TotalCount}} Comments

Your Comment

{{CommentsModel.Message}}

Recent Stories

Top DiscoverSDK Experts

User photo
3355
Ashton Torrence
Web and Windows developer
GUI | Web and 11 more
View Profile
User photo
3220
Mendy Bennett
Experienced with Ad network & Ad servers.
Mobile | Ad Networks and 1 more
View Profile
User photo
3060
Karen Fitzgerald
7 years in Cross-Platform development.
Mobile | Cross Platform Frameworks
View Profile
Show All
X

Compare Products

Select up to three two products to compare by clicking on the compare icon () of each product.

{{compareToolModel.Error}}

Now comparing:

{{product.ProductName | createSubstring:25}} X
Compare Now