LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 04-28-2010, 07:27 PM   #1
rahulchandrak
Member
 
Registered: Apr 2010
Posts: 33

Rep: Reputation: 2
Lightbulb 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.
 
Old 04-29-2010, 11:53 AM   #2
prpednek
LQ Newbie
 
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22

Rep: Reputation: 16
Quote:
Originally Posted by rahulchandrak View Post
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.
Hi Rahul,
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 :

http://tldp.org/LDP/abs/html/sample-bashrc.html

http://www.faqs.org/docs/abs/HTML/files.html

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.

Regards,
Prasad.
 
Old 05-07-2010, 10:43 PM   #3
rahulchandrak
Member
 
Registered: Apr 2010
Posts: 33

Original Poster
Rep: Reputation: 2
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.,
 
Old 05-07-2010, 11:09 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,531
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
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.
 
  


Reply

Tags
bashrc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
One user login cannot start scim, other user logins and root OK allend Slackware 3 05-08-2008 07:25 PM
Running Processes as Another User c4onastick Linux - General 1 09-21-2007 01:45 AM
How to create an email address for an existing user running under Fedora ? kkeith Linux - Newbie 1 06-23-2006 01:37 AM
running software in all user logins whatpot Linux - Software 1 04-08-2005 03:17 AM
How do I create an user to run processes (ONLY)? eantoranz Linux - Security 4 01-04-2005 07:03 PM


All times are GMT -5. The time now is 02:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration