Processes running while we create a new user and the user logs in
Hi, I am a starter to the linux environment. My question is when you create a user for example >useradd test , an user called test is created and during the process of user creation, a directory with username is created on the /home directory and along with it, files like .bashrc, .bash_profile, .bash_logout are created. for example take a look at the .bashrc, it runs the script bashrc located at /etc/bashrc . I would like to know what is there in the bashrc file. Since I am new to the linux, I am not able to understand the shell scripting. I would also like to know what are the other processes which run like .bashrc when a user is logged into his account.
Seems confusing at the start when ur just new to linux, but going forward u'l surely know the wonderful things u can achieve thru linux.
Coming back to the question, bashrc is a file where a user can create aliases, functions and tailor the prompt. It is used by interactive shells like 'bash'.
Checkout some useful links here :
If you have done a lil bit of coding just understand the logic written in the file, youl find it ur self.
Basically when a user logs in his account these file are executed which prepare the environment for him. For example you can add interactive colors to ur prompt, change the name etc.
Hope that helps.
thanks Prasad, I am trying to understand the scripts which are there in the URLs you have posted. I am not able to understand few words like PS1 etc.,
The files under /etc are "global", they are for every user on the system. The files under /home/<username> are for user <username>.
PS1 defines the "prompt string". When logged in at a terminal it is the string shown to the left of the cursor. It can be whatever you like but is most commonly used to show which directory you are in and, by its final character if you are root (final character #) or an ordinary user (final character $). It may also show the name of the computer which is very useful for people having terminals open on several computers at the same time.
|All times are GMT -5. The time now is 08:13 PM.|