Instructions for accessing Ubuntu Bash files on Windows
The 'Bash on Ubuntu' environment on Windows' of Windows 10 contains several different components.
The first time you run the bash.exe program, it will download and install an entire Ubuntu environment. You can access files in File Explorer or other Windows programs, if you know the search location.
You can also access your Windows system drive and any other drive on your computer from the Ubuntu Bash Shell. This allows you to work with normal Windows files using the Linux command utility.
1. Where are the Ubuntu Bash Shell files stored on Windows?
Note, each Windows user account using Bash will have a separate Bash environment and files in the directory.
To access these files, you must first set up the display of hidden folders on File Explorer.
Open the File Explorer window, then click View => Options => Change Folder and Search Options .
On the Folder Options window, select View => Show Hidden files, Folders and Drivers .
Navigate following the path below to find the directory:
C: UsersUSERNAMEAppDataLocallxss
Ubuntu system files are stored at:
C: UsersUSERNAMEAppDataLocalLxssrootfs
The Ubuntu account directory of the main user is stored at:
C: UsersUSERNAMEAppDataLocalLxsshomeUSERNAME
The main Root account directory is stored at:
C: UsersUSERNAMEAppDataLocalLxssroot
2. Location of Windows system drive on Bash
The Ubuntu Bash Shell environment makes your entire Windows system available to work with the same files on both environments.
However, the Bash environment does not appear in the C: drive. Instead, it is placed in / or the root directory you have on Linux. If you perform a ls command to view the contents of the directory, you will only see Ubuntu directories that provide the Linux environment.
On the Windows system drive and other connections in the / mnt / directory - the location of other drives is available on the Linux directory structure.
In particular, you'll find drive C according to the path below in the Bash environment:
/ mnt / c
To change this directory with the cd command, run the following command:
cd / mnt / c
If you have a D: drive, you will find the D: drive in / mnt / d.
For example to access files stored in C: UsersChrisDownloadsFile.txt , you use the path /mnt/c/Users/Chris/Downloads/File.txt in the Bash environment.
Note that, when you access Windows system files, your Bash Shell environment must have repository permissions to run those files. If you launch the file in the usual way from the shortcut, it will have access to the file with your Windows user account.
For example, if you want to access the C: Users folder of the Administrator folder , you must right-click the Bash shell shortcut and select "Run as Administrator" to start the Bash Shell with Admin rights on Windows.
This process works similarly to the Command Prompt, it needs to start under Admin if you want to write, access Admin rights - only files, or write access to system files. Also, you cannot use sudo on a Bash environment.
Refer to some of the following articles:
- Ubuntu Bash tutorial on Windows 10
- Instructions for managing programs in Ubuntu via the command line
- How to enable automatic system update mode on Ubuntu
Good luck!
You should read it
- Everything you can do with the new Windows 10 Bash Shell
- How to Install and Run Bash on Windows 11
- How to create and open folders in VS Code with Git Bash for Windows
- Shortcuts to copy - paste coming soon on Windows 10's Bash Console
- How to use Zsh (or other Shells) on Windows 10?
- Running Linux on Windows 10 does not require a virtual machine, here are 18 things you should know
- How to simplify 7z file compression with Bash Alias
- Tips and tricks after installing Ubuntu
May be interested
- How to use Zsh (or other Shells) on Windows 10?bash shell is integrated into windows 10 anniversary update version is just a compatible class to run linux software on windows operating system. you can use the bash shell to run zsh or any shell you want.
- What is Bash in Linux? What can it be used for?writing bash scripts is one of the best ways to increase your linux expertise, but learning it can be intimidating.
- How to Migrate from Windows to Ubuntuwhen migrating from windows to ubuntu, there are a few things you might need to reflect over, like how to cope the new system, the new interface, and how to adapt to ubuntu in general, and of course, how to transfer your personal files...
- Running Linux on Windows 10 does not require a virtual machine, here are 18 things you should knowthe windows subsystem for linux (wsl) feature - also called bash, helps programmers run ubuntu directly on windows without the need for a virtual machine. the following article will help readers better understand linux tools - wsl.
- How to install Ubuntu in parallel with Windows using USBinstalling ubuntu in parallel with windows 7 and 8 with usb will help users not to waste time writing files to disk, running on many different computers.
- What's New in Ubuntu 21.10?version 21.10 is the latest release of ubuntu and although canonical is turning more attention to the cloud and developers, ubuntu 'impish indri' still comes with some notable changes for those users use the ubuntu desktop every day.
- What is Ubuntu? Why should you use Ubuntu to replace Windows?what is ubuntu? why should you use ubuntu to replace windows? currently, ubuntu is much more popular than before and is strongly developed. in this article, the software tips will help you learn about ubuntu and why ubuntu should be used instead of windows.
- Instructions for downloading Ubuntu - Download the latest Ubuntuinstructions for downloading ubuntu - download the latest ubuntu. ubuntu is free and open source software, which means that users can freely run, copy, distribute, research, change and improve the software. that's one reason why software developers or developers often use this ubuntu operating system.
- Instructions for installing Ubuntu on VMware Workstation - Part 1for some reason, can't you continue to use windows (royalties)? you want to discover a certain operating system that is enough to replace the already familiar windows? you just need 1 software, some operating system to meet the needs of working very simple? check out the free and completely open source ubuntu operating system.
- 7 things Ubuntu does better than Windowsyou may have heard of the linux operating system called ubuntu. if you haven't tried it yet, you may be missing out on some great features.