How to Access Windows Files on Ubuntu: 7 Steps

Table of contents:

How to Access Windows Files on Ubuntu: 7 Steps
How to Access Windows Files on Ubuntu: 7 Steps
Anonim

One of the biggest difficulties when migrating to Ubuntu is having access to Windows files. Fortunately this is not a difficult problem to solve… but it is worth reading the warnings before trying this guide. All that needs to be done is to mount the Windows partition after Ubuntu boots. Of course, the first problem is determining which partition contains the Windows files.

Steps

Access Windows Files in Ubuntu Step 1
Access Windows Files in Ubuntu Step 1

Step 1. Install gparted (System> Administration> Synaptics Package Manager> search for gparted, install and launch it from System> Partition Editor)

Look for the NTFS partition, it's probably the one with Windows.

Access Windows Files in Ubuntu Step 2
Access Windows Files in Ubuntu Step 2

Step 2. Once you have found the partition, make a note of the name - it should be something like / dev / hda2 or / dev / sda2, depending on whether your drives are PATA, SCSI or SATA

Be careful: check that it is the right partition by manually mounting it and reading the files.

Access Windows Files in Ubuntu Step 3
Access Windows Files in Ubuntu Step 3

Step 3. Open Terminal (Applications> Accessories> Terminal) and log in as root by typing sudo -s and pressing Enter

By entering the password you will become root. As root you have to be careful what you do, you could mess up the system if you make a mistake, so focus. Type the following line in the terminal and press Enter:

Access Windows Files in Ubuntu Step 4
Access Windows Files in Ubuntu Step 4

Step 4. mkdir / mnt / windows

Access Windows Files in Ubuntu Step 5
Access Windows Files in Ubuntu Step 5

Step 5. You may want to replace / mnt / windows with / mntdrv or some other name

Now, having created the folder that contains your windows files, type the following command and hit Enter:

Access Windows Files in Ubuntu Step 6
Access Windows Files in Ubuntu Step 6

Step 6. mount -t ntfs / dev / sda2 / mnt / windows -o "umask = 022"

Access Windows Files in Ubuntu Step 7
Access Windows Files in Ubuntu Step 7

Step 7. Make sure you replace / dev / sda2 with the name of the windows partition you made a note of

Now access the mounted drive and verify that you can read the files by going to Locations> Computer and navigating to / mnt / windows. If you see the files, everything is ok. If not, you have mounted the wrong drive: unmount it using unmount / dev / sda2, using your drive name.

Advice

  • Start a text editor as root by typing gedit /etc/init.d/mountwinfs.sh. Paste the lines to mount the drive and save it as /etc/init.d/mountwinfs.sh.
  • If you want to mount the windows drive automatically at every boot, you can do it via a script that runs at startup. The commands will need to be run as root and saved in /etc/init.d. You will have to use the same commands used manually, the rest of the lines are just comments.

Warnings

  • Always make a backup before making system changes.
  • Always check the backup.
  • Allow some time for recovery - don't do it near a deadline.

Recommended: