Search code examples
linuxsublimetext3

Terminus opening to the wrong path


When I open Terminus the command line continually opens to the wrong path.

It automatically goes to this -

bigsky@DESKTOP-ERQRIUA:~/dapptutorial/src$

When I want to it open to

bigsky@DESKTOP-ERQRIUA:~/dapptutorial

I can change it manually using cd dapptutorial and works fine. However, if I close out of the terminal and then open it back again it automatically reverts to ~/dapptutorial/src$.

Is there a way to specify the path here so that it opens where I want it to?

thanks!


Solution

  • at first you should find the absolute path of ~/dapptutorial by this commnad:

    cd ~/dapptutorial; passwd
    

    the absolute path is some thing like this /UserName/dapptutorial

    then add cd /AbsolutePath to the end of your ~/.bash_profile. This is executed only for interactive logins and add cd /AbsolutePath to the end of your ~/.bashrc.

    finally it automatically goes to ~/dapptutorial instead of ~/dapptutorial/src