- How to Access Windows Files From Ubuntu?
- Why do we Need to Access Files of Windows from Ubuntu?
- Why Can you not Access or View the Windows Files From Ubuntu?
- How to Access Windows Files From Ubuntu?
- Conclusion
- Access the Windows file system through WSL!
- 1. Use the cd command in the Linux terminal.
- 2. Moving files between the two systems through WSL.
- 3. Editing windows files through WSL.
- 4. Creating files in windows through WSL.
- 5. Deleting files from the windows file system through WSL.
- Top comments (5)
- Read next
- NextJS 13 – How to Web3?
- Using Webflow DevLink Beta
- How to build a LLM powered carbon footprint analysis app
- Enhancing Your Laravel API with Treblle Platform
- How can I access Windows files from Ubuntu
- 4 Answers 4
How to Access Windows Files From Ubuntu?
The increasing competition between the operating system makes the developers create new functionalities, ultimately resulting in the dual boot of different OSs. it is the same case with Ubuntu and Windows. What if you want to access the files from Windows while the system is booted in Ubuntu, and no disk is showing in the “Other Locations” directory? It is possible to access Windows files from Ubuntu.
This guide explains how users can access Windows files from Ubuntu in dual-boot.
- Why do we Need to Access Files of Windows From Ubuntu?
- Why can you not Access Windows Files From Ubuntu?
- Access Windows Files From Ubuntu
Why do we Need to Access Files of Windows from Ubuntu?
While working on Ubuntu, there is a good chance that you might need a file from Windows. That file could be text, audio, video, or other file types. For example, a user must restart the system, boot into Windows, send a file, and reboot into Ubuntu. It is a bad practice to follow and highly inappropriate.
To get rid of this problem between the operating systems, Ubuntu supports FAT, FAT32, NTFS, and many other file systems through which the users can access the files of Windows from Ubuntu.
Why Can you not Access or View the Windows Files From Ubuntu?
You cannot access Windows files from Ubuntu because the disk(s) in which the Windows is installed is not mounted on the system.
The mounting, in simple words, is the ability of the operating system to make the disks or media accessible through the current file system of the computer. For example, Linux does support all the file systems used on Windows, which isn’t the same as Windows as it does not support major Linux file systems such as ext, ext2, ext3, ext4, and others.
How to Access Windows Files From Ubuntu?
While using Ubuntu, there are a few steps to be followed to access Windows files:
Step 1: Install NTFS-3G
The NTFS-3G is a driver for handling NTFS (used in Windows) file systems. It has features and can be used on Linux, macOS, FreeBSD, Android, and many other operating systems. To install it, use this command:
The above image confirms the installation of NTFS-3G on the system.
Step 2: List the Partition Tables
By the use of fdisk command and “-l” flag, let’s list the disk as in this format:
The fdisk command is used to create, manipulate, and display the partition tables, scroll down to view the
more readable results, such as below:
Note: The above image is a result of dual-boot, and the results can be different whether you have a different hard drive or using Wmware.
From here, note down the disk you want to mount/access. Let’s say it is “/dev/nvme0n1p4” in this case.
Step 3: Install gparted to Check if the Disk is Mounted or not
The gparted is a free GUI-based tool that can do multiple operations on the disk, including creating, deleting, resizing, growing, shrinking, and much more. It can also check whether the disk is mounted on the system. Use this command to install it:
After entering “Y,” the installation process will continue.
Let’s open the gparted using this command, and it will ask for the user password:
By looking at the above image, it is evident that the disk is not mounted, and the mount point isn’t created where it can be mounted.
Step 4: Create a Mount Point
The mount point is a directory of a file system linked to another (logically). First, create a new directory in the “/mnt” directory:
When the above command is executed, a new directory ntfs will be created in /mnt folder.
Step 5: Mount the Disk
When the mount point is created, use this command to mount the disk:
$ sudo mount -t ntfs-3g /dev/nvme0n1p4 /mnt/ntfs
Here is the breakdown of the above command:
- The “mount” invokes the mount command.
- Flag “-t” limits the set of filesystem types.
- The “ntfs-3g” userspace NTFS driver for Linux that is used with the mount command in the disk mounting.
- /dev/nvme0n1p4 is the name of the disk to be mounted.
- /mnt/ntfs is the location on the Linux system where the disk has mounted.
The disk (where Windows is installed) is now mounted on Ubuntu, and users can access the Windows file from Ubuntu.
Step 6: Check the Mounted Disk
To access the mounted disk, using the cd command and the ls -l command to list files is recommended:
The listed files indicate that the Windows files can now be accessed.
Conclusion
To access Windows files from Ubuntu, the disk where the Windows is installed needs to be mounted. Although all the disks are mounted by default from Ubuntu (18.04) LTS (Bionic Beaver), in some cases, it is not, so ntfs-3g, along with the mount command, is used to mount the unmounted disks in a mount point.
This guide has shed light on how users can access Windows files from Ubuntu.
TUTORIALS ON LINUX, PROGRAMMING & TECHNOLOGY
Access the Windows file system through WSL!
Have you ever wondered, how to access the windows file system through WSL? If the answer is yes you are in the right place! Microsoft WSL has given us an incredible way to access the windows file system, you have just to navigate through an exact path to do it. Without further due, let’s dive into the topic.
1. Use the cd command in the Linux terminal.
cd /mnt/c/Users **OR** cd /mnt/d/your_folder/your_folder
2. Moving files between the two systems through WSL.
If you want to move files between the two operating systems you can simply use the cp or mv commands.
cp — command for copying files
mv — command for moving files
Use of cp command
cp /mnt/c/file.txt /home/username/Documents
mv /mnt/c/file.txt /home/username/Documents
3. Editing windows files through WSL.
To edit windows files through the Linux terminal using WSL, you have to use any text editor that can be opened in the terminal. One of the most famous text editors is nano. In our example, I am going to use the nano editor.
Type into the terminal nano and the path to the file.
sudo nano /mnt/c/Users/file.txt
4. Creating files in windows through WSL.
To create a file in a specific windows directory you have first to navigate to it and then use the touch command to create a file.
touch — a command that creates a file.
. The file extension can be anything you want.
cd /mnt/c/Users/Public/Documents/ touch filename.txt
5. Deleting files from the windows file system through WSL.
To delete windows files using WSL, you have to navigate to the directory where the file lives and use the rm command.
rm — a command that deletes files / directories
cd /mnt/c/Users/Public sudo rm example_file.jpg
Congratulations you learned 5 vital skills about working with the Linux terminal. 🎺🎺🎺
If you have any questions, comment down, I will answer as soon as possible.
Top comments (5)
A self-taught programmer and software enthusiast. In my free time, I enjoy walking and running on local trails, playing my guitar, and plant based cooking.
Nice quick guide! I got sick of typing cd /mnt/c/Users/Joe so I made an alias in .bash_aliases file I called called cdwin (takes you to Windows «home» folder»
- create .bash_aliases in your WSL Ubuntu home directory: touch .bash_aliases
- nano .bash_aliases
- Enter alias cdwin=’cd /mnt/c/Users/’ into .bash_aliases file
- ctrl + x and then Y to save aliases file.
- Create a symbolic link in bash shell: ln -s /mnt/c/Users/ win
Now you can get to «windows home» from anywhere by typing cdwin from within WSL Ubuntu.
2 likes Like Comment button
👋 Hi, I’m Ivaylo Ivanov 👀 I’m interested in AI, server-side, cybersecurity, and ethical hacking. 🌱 I’m currently learning Javascript, Node.js, Go, and Python.
That’s really cool little tip!
2 likes Like Comment button
Question: why would you ever run Windows in the first place?
2 likes Like Comment button
Thoughts on keeping working code files on the windows side to keep them in OneDrive? Is it overkill? Not everything deserves a place on github.
2 likes Like Comment button
👋 Hi, I’m Ivaylo Ivanov 👀 I’m interested in AI, server-side, cybersecurity, and ethical hacking. 🌱 I’m currently learning Javascript, Node.js, Go, and Python.
Personally, I think that GitHub is the best place to store your projects because it is well-integrated with code editors and meant to be used by programmers. If you do not want your work to be publically accessible on GitHub, you can always create a private repository, where only you are going to have access. I do not have experience with google drive for keeping coding projects on there, but certainly, I would prefer Github.
1 like Like Comment button
For further actions, you may consider blocking this person and/or reporting abuse
Read next
NextJS 13 – How to Web3?
Using Webflow DevLink Beta
Bernie January Jr. — Jun 26
How to build a LLM powered carbon footprint analysis app
Enhancing Your Laravel API with Treblle Platform
👋 Hi, I’m Ivaylo Ivanov 👀 I’m interested in AI, server-side, cybersecurity, and ethical hacking. 🌱 I’m currently learning Javascript, Node.js, Go, and Python.
How can I access Windows files from Ubuntu
Is it possible to get the files I had on Windows onto my Ubuntu desktop? How can I connect to my Windows partition from Ubuntu?
4 Answers 4
yes of course you can acccess windows NTFS/FAT32 partitions from Ubuntu
Using the File Manager For those using a desktop version of Ubuntu, or one of its offical derivatives, the easiest and quickest way of mounting NTFS or FAT32 partitions is from the file manager: Nautilus in Ubuntu, Thunar in Xubuntu, Dolphin in Kubuntu and PCManFM in Lubuntu. Simply look in the left pane of the file manager for the partition you wish to mount and click on it — it will be mounted and its contents will show up in the main pane. Partitions show with their labels if labelled, or their size if not.
Unless you require your Windows partition — or a NTFS/FAT32 partition for data shared with Windows — mounted every time you boot up for one of the reasons given below, mounting from the file manager in this way should suffice.
If you are using a Wubi version of Ubuntu and you wish to browse the host partition, you do not need to mount it — it is mounted already in the «host» folder. Click on «File System» in the left pane of the Nautilus file browser and then open the host folder which you will see in the main pane.
Just Open Home folder from your Dash menu and you can see all partitions mounted under Devices:
Click on the needed drive and copy files/folders thw way you want to your Ubuntu drive