Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2815

cd in shell not working, WSL Ubuntu [duplicate]

$
0
0

I am using WSL/Ubuntu on Windows 10. I want to go to /mnt/c. Typing cd /mnt/c is working. But when I enter the command into a shell script, it is not.

  1. I added the line: cd /mnt/c to a shell script

  2. I used chmod +x. When executing the script, the position in the shell did not change

  3. I added the command ls

    ls /mnt/c was executed
    

How can I move to /mnt/c using a script?

thansk Harald


Viewing all articles
Browse latest Browse all 2815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>