Answer the question
In order to leave comments, you need to log in
How to choose a default directory when opening a console with an SSH connection?
Well, that is, when connected via ssh, the console opens and I am there in / root. And how to choose the project folder by default. And then you have to constantly do cd ../blab/bsla/anal'a and so on and so forth, tired.
Answer the question
In order to leave comments, you need to log in
Connect to the server
go to the desired folder
Enter
echo $PWD > ~/.bash_lastpwd
~/.bashrc
if [ -f ~/.bash_lastpwd ]; then
cd $(cat ~/.bash_lastpwd)
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question