mskyaxl / wsl-terminal

Terminal emulator for Windows Subsystem for Linux (WSL)
MIT License
3.12k stars 158 forks source link

How to make the terminal's path in /root when I open it ? #113

Closed ontheway1215 closed 5 years ago

ontheway1215 commented 6 years ago

When i open the terminal ,it path is too long,just like this image I just want it can be like this image when i open it first

jaredparkinson commented 6 years ago

There is a shell script that lives at ~/.bashrc that is run when you open a terminal window. You can add a line in there to cd into the root folder. The ~/.bashrc file needs to be opened inside the Linux environment itself, and not in Windows. nano ~./bashrc will work if you haven't installed any other text editors, like vim. Whatever editor you choose, add the follow line to the end of the file: cd / Now the next time you open the terminal you should be at the root directory.

szthanatos commented 6 years ago

Just add '-C ~' args in your shortcut's target.