I was going over this article and it states in step 3
Add the following to your .bashrc (or the appropriate startup file for your shell) To use it immediately, be sure to type “source .bashrc”
Any idea on how I could know what my startup file is ? I am using putty ?
In most cases, the bashrc is a hidden file that lives in your home directory, its path is ~/. bashrc or {USER}/. bashrc with {USER} being the login currently in use.
Once you use putty to SSH into your server, you can run "ls -al . bashrc" and it should show you the file, edit this with an editor you know, if none, then use vi like this "vi . bashrc". Go to where you need to edit the file and type in "i" to put vi in Insert mode.
bashrc file is a script file that's executed when a user logs in. The file itself contains a series of configurations for the terminal session. This includes setting up or enabling: coloring, completion, shell history, command aliases, and more. It is a hidden file and simple ls command won't show the file.
This shell invocation normally reads /etc/profile and its private equivalent ~/. bash_profile (or ~/. profile if called as /bin/sh) upon startup. An interactive non-login shell is normally started at the command-line using a shell program (e.g., [prompt]$ /bin/bash) or by the /bin/su command.
Once you use putty to SSH into your server, you can run "ls -al .bashrc" and it should show you the file, edit this with an editor you know, if none, then use vi like this "vi .bashrc".
Go to where you need to edit the file and type in "i" to put vi in Insert mode. Next type in your text. Once you are done press the escape button and ":wq", no quotes for the i or :wq.
Next you can source it by typing "source .bashrc" and the setting you added should be part of your BASH shell environment now.
If 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