In Windows, I use PuTTY to log in a Linux-based remote server via SSH.
Is is possible to change the default directory entry point I get to after I connect and login? (That would be a nice time saver.)
e.g. from server/home/
to server/home/subdir/subdir/
Just type “pwd” and hit enter. cd: Now, you are at a location and you want to navigate to another. Type “cd /location” and you will reach that location. It stands for “change directory”.
Change the working directory Navigate your server's filesystem using the cd command. cd /path/to/your/directory – change the current working directory to the nominated path. Note that the first / indicates the path is relative to the root directory.
You can also change the directory within PuTTY itself:
Configuration → Connection → SSH
Fill in the "Remote command" field with the following:
cd subdir/subdir ; /bin/bash
cd subdir/subdir
to ~/.bashrc
or ~/.bash_profile
, orIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With