Need help about bash profile file.
Hi,
I want to know the difference between the following files 1- .bash_profile 2- .bashrc 3- .bash_logout These three files are located in with their respective names under the following dir /etc/skel /home/user1 Further when i login into terminal i see the login prompt as [user1@localhost user1]$ I want that when user2 will login he automatically login into [user1@localhost /]$ the output when i use [user1@localhost user1]$cat .bash_profile ------------------------------------------------------------------ # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin: export PATH unset USERNAME ---------------------------------------------------------------- Please guide me.Thanks in advance. mypass |
These files are described in the bash man page:
Code:
~/.bash_profile Evo2. |
The Bash startup files are explained here.
The /etc/skel files are used when setting up a new user. Any files in /etc/skel are copied to the new users home directory. More info in the useradd (and adduser?) man page. The command prompt is configured using the $PS1 variable, set in the Bash startup files. Special characters used in PS1 are described here. |
thanks for the prompt reply. well i am new in linux. just tell me how can i change
PATH=$PATH:$HOME/bin: so i may see the login prompt of user2 as [user1@localhost /]$ where may i edit the path ? |
Quote:
bash howto set prompt http://www.cyberciti.biz/tips/howto-...up-prompt.html Evo2. |
thanks a lot for your help.
|
Hi,
You could setup a .bashrc & .bash_profile for your user, maybe a sample will aid; Code:
sample .bash_profile; Code:
sample .bashrc; Plus as others have stated you can always 'man bash' to get some understanding. Look at these useful links; Linux Documentation Project Rute Tutorial & Exposition Linux Command Guide Linux Newbie Admin Guide LinuxSelfHelp Getting Started with Linux These links and others can be found at 'Slackware-Links' . More than just SlackwareŽ links! |
All times are GMT -5. The time now is 01:44 AM. |