TOPIC 8

Date: 3/12/2014
Linux and Windows interoperability
Linux for Engineering and IT Applications


Access Windows shared drive on Linux.
Exercise
  • On Win_XP virtual desktop, create a new folder, C:\SHARED
  • Share the folder over the network by right clicking on it and then following the steps below:
    1. 2. 3.

  • You can access the shared network drive, 'SHARED', to list, download and upload files via command smbclient on the desktop as follows:
    smbclient //xpvm/SHARED -U Administrator
    
    then provide the password of Administrator on Win_XP host.
  • To see the list of commands in the smbclient shell, simply type:
    ?
    
  • Create a new folder and upload file /etc/hosts into it by using smbclient
    mkdir DIR
    put /etc/hosts DIR\hosts
    ls
    cd DIR
    ls
    quit
    

  • Another way to access the Windows shared drive on Linux is by using smbfs mount.
    Install smbfs package on the desktop and mount the shared drive:
    apt-get install smbfs
    mkdir /mnt/smb
    mount -t smbfs -o username="xpvm\Administrator",passwd=unisys //xpvm/SHARED /mnt/smb
    df -h
    
  • You can browse /mnt/smb directory content, copy and delete files in it like on a local file system:
    cp /etc/services /mnt/smb
    rm -rf /mnt/smb/DIR
    
  • Unmount the shared file system:
    umount /mnt/smb
    




  • Take me to the Course Website