accessing windows files from linux

1
Accessing Windows Files from Linux Before you can Use it, you need to Mount It When you install Linux on a system with an existing operating system like Microsoft Windows™ it is easy to make those files and directories available under Linux. Often installations of Linux even auto-mount certain things like floppy drives, cd-roms, etc. for you. However, it is often common for your Windows disk/partition not to be automatically mounted for use. To be able to get access to your Windows drive/partition under Linux you will need to perform two steps. 1. Create a directory under Linux that will link to your Windows drive/partition at the prompt type (only do this once): mkdir /mnt/win 2. Then mount your Windows drive and link it to this new directory under Linux at the prompt type exactly: mount -t vfat /dev/hda1 /mnt/win NOTE: If you are using Windows NT, 2000, 2003, or XP you need to instead use this command: mount -t ntfs /dev/hda1 /mnt/win HOWEVER, NOTICE that for those mounting a Windows NT File System it is possible to corrupt the NTFS when writing to it from Linux. Therefore most of the time the mount will only mount the Windows drive as read only! 3. Now try changing directories to your Windows drive/partition by typing at the prompt: cd /mnt/win and then typing: ls –all Notice that the actual disk or partition information in this example is /dev/hda1. This is usually the case if you have installed Linux onto a system with existing Windows. The hda1 refers to the first partition of your master (1st) hard drive. However, in some cases you may be using a system where Linux is on the hda1 and your Windows drive is actually something different. If you have an error, check what drives and partitions are already mounted by simply typing the command: mount If you get the Error Message “Filesystem Unsupported” your Linux installation may not have included the needed NTFS (NT, Win 2000, WinXP) driver. This requires either a reinstall or Kernel compile. Wrien for Invenve soluon in-house soſtware developer developing java applicaons. In-charge: Vivek K. Singh Date: May 04, 2004

Upload: wiweck-singh

Post on 26-May-2015

335 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Accessing windows files from linux

Accessing Windows Files from Linux Before you can Use it, you need to Mount It

When you install Linux on a system with an existing operating system like Microsoft Windows™ it is easy

to make those files and directories available under Linux. Often installations of Linux even auto-mount

certain things like floppy drives, cd-roms, etc. for you. However, it is often common for your Windows

disk/partition not to be automatically mounted for use.

To be able to get access to your Windows drive/partition under Linux you will need to perform two steps.

1. Create a directory under Linux that will link to your Windows drive/partition at the prompt type (only

do this once): mkdir /mnt/win

2. Then mount your Windows drive and link it to this new directory under Linux at the prompt type

exactly: mount -t vfat /dev/hda1 /mnt/win

NOTE: If you are using Windows NT, 2000, 2003, or XP you need to instead use this command:

mount -t ntfs /dev/hda1 /mnt/win

HOW EVER, NOTICE that for those mount ing a W indows NT Fi le System i t is poss ib le to

corrupt the NTFS when wr i t ing to i t f rom Linux. Therefore most of the t ime the mount wi l l

on ly mount the W indows dr ive as read only!

3. Now try changing directories to your Windows drive/partition by typing at the prompt: cd /mnt/win

and then typing: ls –all

Notice that the actual disk or partition information in this example is /dev/hda1. This is usually the case if

you have installed Linux onto a system with existing Windows. The hda1 refers to the first partition of your

master (1st) hard drive. However, in some cases you may be using a system where Linux is on the hda1

and your Windows drive is actually something different. If you have an error, check what drives and

partitions are already mounted by simply typing the command: mount

If you get the Error Message “Filesystem Unsupported” your Linux installation may not have included the

needed NTFS (NT, Win 2000, WinXP) driver. This requires either a reinstall or Kernel compile.

Written for Inventive solution in-house software developer developing java applications.

In-charge: Vivek K. Singh

Date: May 04, 2004