android bsd linux unix & open-source world


Linux: How to mount SMB/CIFS shares under Linux

This document provides help on mounting SMB/CIFS shares under Linux.
All files accessible in a Linux and UNIX systems are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree.

Use the mount command to mount remote SMB/CIFS shares under Linux as follows:

mount -t cifs // -o username=myUser,password=myPassword /mnt/mySharedFolder

-t cifs : File system type to be mount
-o : are options passed to mount command, in this example I had passed two options. First argument is the user name (myUser) and second argument is the password (myPassword) to connect to the remote computer.
// : remote computer and share name
/mnt/mySharedFolder : local mount point directory

Make sure to create /mnt/mySharedFolder first.

Print This Post Print This Post

FreeBSD: How to mount SMB/CIFS shares under FreeBSD

This document provides help on mounting SMB/CIFS shares under FreeBSD Operating System.
The mount_smbfs command mounts a share from a remote server using SMB/CIFS protocol. You can easily mount MySharedFolder share using the following syntax:

mount_smbfs -I //myUser@serverName/mySharedFolder /mnt/mySharedFolder

Where, is the IP address of the remote computer.
myUser is your user name.
serverName is NETBIOS Server Name.
mySharedFolder is CIFS share name.
/mnt/mySharedFolder is the local mount point directory.

Print This Post Print This Post

How To mount ISO images in FreeBSD and Linux

An ISO image is an archive file (disk image) of an optical disc using a conventional ISO (International Organization for Standardization) format. ISO image files typically have a file extension of .ISO.

The name "ISO" is taken from the ISO 9660 file system used with CD-ROM media, but an ISO image can also contain UDF file system because UDF is backward-compatible to ISO 9660.

1. Procedure to mount ISO images under Linux

You can mount an ISO image via the loop device under Linux. It's possible to specify transfer functions using loop device.

Print This Post Print This Post

How To Access SAMBA shares through SSH in Linux

You can access Samba shares by using SSH tunneling. We need a host computer (x.y.z.w) and a destination computer (, is located in the x.y.z.w network), we'll use adi as username and pass as password.

First we'll create a new mount directory:

# mkdir -p /mnt/share

Now we connect to it:

# ssh -N -L 139: adi@x.y.z.w

Now we have to run the following commands:

# umount /mnt/share

# mount -t smbfs -o username=adi,workgroup=WORKGROUP,password=pass,port=139,dmask=770,fmask=660,netbiosname=computer1 //localhost/share /mnt/share

x.y.z.w=computer's IP address computer
adi=samba username
WORKGROUP=your workgroup
pass=password for the share

Print This Post Print This Post