Creating the Share on Linux
To set up a shared folder on Linux for Windows to access, start with installing Samba.
sudo apt-get install samba
After Samba installs, configure a username and password that will be used to access the share.
smbpasswd -a geek
Note: In this example, we are using ‘geek’ since we already have a Linux user with that name – but you can choose any name you’d like.
Create the directory that you’d like to share out to your Windows computer. We’re just going to put a folder on our Desktop.
mkdir ~/Desktop/Share
Now, use your favorite editor to configure the smb.conf file.
sudo vi /etc/samba/smb.conf
Scroll down to the end of the file and add these lines:
[<folder_name>]
path = /home/<user_name>/<folder_name>
available = yes
valid users = <user_name>
read only = no
browsable = yes
public = yes
writable = yes
Obviously, you’ll need to replace some of the values with your personal settings. It should look something like this:
Save the file and close your editor. Now, restart the SMB service for the changes to take effect.
sudo service smbd restart
Your shared folder should now be accessible from a Windows PC.
Accessing the Linux Share from Windows
Now, let’s add the Linux share to our Windows Desktop. Right-click somewhere on your Desktop and go to New > Shortcut.
Type in the network location of the shared folder, with this syntax:
\\IP-ADDRESS\SHARE-NAME
If you need the IP of your Linux computer, just issue the following command:
ifconfig
Accessing the Windows Share from Linux
You should be able to mount the shared folder by using the GUI in Linux, but it’s also very easy to do with the command line, and it’s easier to show a terminal example because it will work across many different distributions.
You’ll need the cifs-utils package in order to mount SMB shares:
sudo apt-get install cifs-utils
After that, just make a directory and mount the share to it. In this example, we will mount the folder to our Desktop for easy access.
mkdir ~/Desktop/Windows-Share
sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek
In case you need help understanding the mount command, here’s a breakdown:
sudo mount.cifs
– This is just the mount command, set to mount a CIFS (SMB) share.WindowsPC
– This is the name of the Windows computer. Type “This PC” into the Start menu on Windows, right click it, and go to Properties to see your computer name.How to Mount ISOs and Other Disc Images on
Linux
Ubuntu’s Unity desktop and GNOME include an “Archive Mounter” application that can mount ISO files and similar image files graphically. To use it, right-click an .ISO file or another type of disc image, point to Open With, and select “Disk Image Mounter.”
You can later unmount the image by clicking the eject icon next to the mounted image in the sidebar.
You can also mount an .ISO file or another disc image with a Linux terminal command. This is particularly useful if you’re just using the command line, or if you’re using a Linux desktop that doesn’t provide a tool to make this easy. (Of course, graphical tools for mounting ISO files and similar images may be available in your Linux distribution’s software repositories.)
To mount an ISO or IMG file on Linux, first open a Terminal window from your Linux desktop’s applications menu. First, type the following command to create the /mnt/image folder. You can create practically any folder you like — you just have to create a directory where you’ll mount the image. The contents of the disc image will be accessible at this location later.
sudo mkdir /mnt/image
Next, mount the image with the following command. Replace “/home/NAME/Downloads/image.iso” with the path to the ISO, IMG, or other type of disc image you want to mount.
sudo mount -o loop /home/NAME/Downloads/image.iso /mnt/image
To unmount the disc image later, just use the umount command:
sudo umount /mnt/image