Copy Files from Windows to Windows Subsystem for Linux (WSL) [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
The community reviewed whether to reopen this question 10 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have enabled developer mode and installed Bash on Ubuntu on Windows.
My home directory can be found under %localappdata%\Lxss\home\<ubuntu.username>\, i have created a sub-directory called Pictures such that the full path should be
on windows: C:\Users\<windows.username>\AppData\Local\lxss\home\<ubuntu.username>\Pictures
on bash: /home/<ubuntu.username>/Pictures
if i create a file from bash using the command touch hello.txt i can freely see this file in the windows UI and copy it to my Desktop. However, if i create a new text file from the windows UI and save it in C:\Users\<windows.username>\AppData\Local\lxss\home\<ubuntu.username>\Pictures, even if i restart bash or windows, the file is not visible when i do ls -l.
Why can't bash see files created from the Windows side in it's own home directory?
EDIT Using /mnt/c is not a solution, i am trying to understand why it doesn't see those files and if there is a remedy to that so that it will be able to see UI created files, rather than trying to use the terminal to copy-paste or move files over.

You should be able to access your windows system under the /mnt directory. For example inside of bash, use this to get to your pictures directory:
cd /mnt/c/Users/<windows.username>/Pictures

You should only access Linux files system (those located in lxss folder) from inside WSL; DO NOT create/modify any files in lxss folder in Windows - it's dangerous and WSL will not see these files.
Files can be shared between WSL and Windows, though; put the file outside of lxss folder. You can access them via drvFS (/mnt) such as /mnt/c/Users/yourusername/files within WSL. These files stay synced between WSL and Windows.
For details and why, see:
https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/

Related

Recently installed Linux Bash Shell (Ubuntu installed) not showing my files on my windows computer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
Improve this question
I've ran into a problem when trying to use an installed Linux bash shell instead of my Windows command prompt. I can't get my computer files to show on my Ubuntu terminal, even though when I repeat the same actions on my windows command prompt they seem to work.
I'm thinking there must be an issue with my installation, possibly I need to do a few more steps to get it to work like my regular command prompt terminal, but I'm not sure how to do this currently. I've added some screenshots above for additional context of me not finding my files in Ubuntu but being able to find them through windows command prompt.
It's because your linux home directory is most likely located outside of your windows user's home directory.
Use windows search to look for one of your ubuntu files (for example git_101) to determine where is your ubuntu home directory in relation to windows file system.
This can vary depending on how you installed ubuntu, but you might be able to access your windows filesystem via the /mnt directory as well. You can check that by running ls -lah /mnt.

Getting files on linux UBUNTU from Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am trying Linux UBUNTU on my windows system. I am knew in Linux UBUNTU.but I don't know that where I can find my files that were on windows 10.
In case you mean WSL Ubuntu:
Your Harddrives are mounted under /mnt/. I like to create a symbolic links to them in my home folder. The should be named like so:
/mnt/c # your C:\ drive
/mnt/s # your S:\ drive
...
In case you mean a Linux livesystem:
If you use a system with a graphical user interface, somewhere in your filemanager you should see the respective drive. Click on it and it should auto-mount. Afterwards you should be able to access your files just as you would expect via the filemanager.
In case you're in terminal mode (= you do not have any graphical user interface), things might get a little strange from a beginner's perspective. In this case I would recommend that you make yourself familiar with the rough structure of the linux filesystem and the commands mount, umount and sudo. Generaly said you will have to do the same thing your filemanager does for you. You mount the drive somewhere in the filesystem tree and then access the folder:
mount /dev/<drive> <directory> # mount your drive into the fs tree
cd <directory> # switch to that folder
ls # should display your drive's content

SCP: file not found when trying to copy from windows to linux server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
In putty i want to copy a .war file from my machine (at D:\\file.war) to a remote server like this:
sudo scp -r D://file.war user#xxx.xxx.xxx.xxx:/tomcat8/webapps
it doesn`t work and i have also tried things like:
sudo scp -r \file.war user#xxx.xxx.xxx.xxx:/tomcat8/webapps
or
sudo scp -r /cygdrive/d/file.war user#xxx.xxx.xxx.xxx:/tomcat8/webapps
I have to type in my password two times then (one time for sudo, next time for user). But then i get always the same error:
<pathtolocalfile>: No such file or directory
Putty always connects via SSH. I need sudo to get permission to write into the webapps folder.
How do i have to specify the path? Sry, i´m trying this for the first time and after some research i´m getting more and more confused about how to do this the right way.
I managed to do what i wanted, although my solution is not the nicest:
I connected to the server using WinSCP and my normal user account.
There i copied the file into my user home directory.
Then i opened the Putty console in WinSCP and changed to root user with "sudo" (and typing in my password again).
Now i finally was able to copy the file from my user accounts home directory into the webapps folder of tomcat.

In Linux which folder contains installed programs, like "program files" in windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am working on a java project that is build using maven. I have to run this project on Linux. It is required to start elastic search before running the application.
I need to know the best place on Linux O.S. to keep the elastic search.
Thanks
/usr/bin is the standard location for programs installed by the system tooling. /usr/local/bin or /opt might be other places to look, in case of programs installed by users without the system tooling, e.g. programs built from source locally.
For more about common conventions for paths on Unix systems, see here: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
when you enter a cmd in shell, the cmd will be found in $PATH
so check echo $PATH
You can put it anywhere and add the elastic search bin directory to PATH environment variable. But maintaining different executable locations and the increasingly longer path variable would be difficult sooner or later. Hence, there are some conventions so you may choose to follow them. Here is what I would do:
Extract the elastic search package in either /usr/lib/ or /opt/
Create a softlink to the elastic search binary in /usr/lib and put the softlink in /usr/bin. PATH variable does not need to be updated.

How to access a shared folder with Ubuntu on VirtualBox [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a Virtual Machine, and I want to share some files with my computer. But I don't know how to access them.
In the settings of my VM, I added the repository that I want to share. After that I started my VM and I think that I have to use the "mount" command. I also think that the repository that I want is in /dev but I don't know which file after that.
This is the command that I think I have to use :
mount -t vfat /dev/something /media/sf-Documents
Can someone help me and tell me how I have to do to get the content of my folder on my computer please ?
Usually, it is sufficient to:
Install the Guest Additions
Enter the Settings -> Shared folders menu
Click on the "+" icon
Select "automatic mount"
Reboot the machine
You'll find the shared folder under the /media directory
This procedure is known to not work for some versions of the Guest Additions. In case, try a different version of VirtualBox (e.g., switch from 5 to the more stable 4 version).
At first, to share folder between Ubuntu machines: choose folder -> right click -> folder sharing(or in file Properties). You can access files on a remote computer using SSH: Install openssh-server on a computer you want to connect to

Resources