LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-06-2003, 07:50 AM   #1
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Rep: Reputation: 30
.bashrc


hey guys i read this
First things first, let's get a decent looking prompt. Go to your home directory by typing:
cd ~
and then create a text file called .bash_profile. Inside .bash_profile, type the following:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
and save it. The create/edit your .bashrc (in the same directory) and type in the following:
alias ll='ls --color -l'
LS_COLORS="no=00:fi=00:di=01:ln=01;36:*.gz=01;35:*.tar=01;34:*.bz2=01;35:*.zip=01;35"
PS1="[\u#\w] "

export PS1 LS_COLORS
Logout and re-login. Try typing 'll' and see if your .bashrc was ready properly. Make sure your prompt looks correct.

and it worked i changed the login prompt, but i really dont know HOW it worked....for example i kno the PS1= changes the cli shell prompt...so can someone please give me a run down of how i did this and if possible could they elaborate a little bit..thanks
 
Old 05-06-2003, 10:36 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
the .bashrc stuff was just to make sure .bashrc got loaded.
yes PS1 is the prompt. man bash would show you the
different settings you can have for that. the LS_COLORS
line assigns certain display colors to the types of files
listed. the number is the color. i can't remember where
to find those.
the alias line for ll runs that line after when you type ll.
the --color is for ls to display files in different colors.

i think there is a prompt howto on the web. and there
is a site that will let you pick whatever properties you
wish for a prompt, and it will create the code for you.
 
Old 05-06-2003, 10:46 AM   #3
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
wow...thanks alot...yea those are hex colors...im a web dev so i have some memorized ...thanks
 
Old 05-06-2003, 10:55 AM   #4
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
ok i got it working ...but now i want to set the PS1 as default for all users to PS1="[\u@\h \w]$ " how do i do that?
 
Old 05-06-2003, 11:23 AM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by roofy
ok i got it working ...but now i want to set the PS1 as default for all users to PS1="[\u@\h \w]$ " how do i do that?
Place that in your /etc/profile or have it copied to every user's .bashrc file if they have one..
 
Old 05-06-2003, 11:45 AM   #6
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
nm i installed rh 7.2, i dont think im mentally ready for slack yet
 
Old 05-06-2003, 12:23 PM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by roofy
nm i installed rh 7.2, i dont think im mentally ready for slack yet
That was quick.. Slack isn't any harder than Redhat, Redhat just has more GUI tools and such to work with. I quite frankly find most other distro's like Redhat, Mandrake and the such much more confusing as they tend to move things around, have longer and more complicated config files, making them harder to understand, etc.. Oh well, good luck with Redhat.
 
Old 05-06-2003, 01:32 PM   #8
roofy
Member
 
Registered: Apr 2003
Location: Florida
Distribution: Redhat 7.2
Posts: 222

Original Poster
Rep: Reputation: 30
well i never use the gui anyway cuz i dont have an extra monitor so i just use ssh to admin my systems...i like rh becuase i compile my software and it works becuase it follows standard dir structure..just my bag i guess
 
  


Reply


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
where is bashrc ? Kanaflloric Slackware 12 10-06-2007 02:47 PM
.bashrc ? Longinus Linux - Newbie 2 03-27-2004 11:50 AM
no .bashrc? mattman Slackware 6 06-10-2003 03:59 PM
bashrc nobu Slackware 6 03-21-2003 10:53 AM
.bashrc prasad Linux - General 1 04-14-2001 09:51 AM


All times are GMT -5. The time now is 07: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