Set the Default Path and Prompt


The file to edit is .bash_profile and .bashrc.   Login takes the values from the /etc/passwd file and the MAIL variable uses the path /var/mail/spool/username, where username is the name passed to login by getty.


to view the current environmental variables set by default or was set rather use the following commands:


  $ env 


  $ printenv 


to locate a particular command set or service physically in the file system use the following for example we are looking for ifconfig :


  $ whereis ifconfig 


  edit the file .bash_profile and look for the lines : PATH=$PATH:$HOME/bin 

  put your path or the path desired  ex.:  PATH=$PATH:/sbin:$HOME/bin 


  save this file and then apply the changes via the following command:


  $ source .bash_profile 



Change the Default Prompt

 

try the following to change the default prompt for your bash.


  $ PS1='$OSTYPE r00lz ->'


after your press ENTER, you'll see


  linux-gnu r00lz ->