LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2003, 06:29 PM   #1
Dach
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
Angry At witts end here


Aight. heres the deal. For a while now i have been wrastlin with learning linux. I went through winblows in no time so naturaly havin a tougher time with this stuff. Im on redhat 8 sumtin. and heres the thing. On my friends system with redhat9 his text in the terminals comes out in color. like folders one color, files another etc etc. When i asked him how he did this he simply said, "oh i wrote a script" I asked him how, he said, "with the script" So, after beating him in the head for the rude one line awnsers that had no help what so ever i was curious if anybody out there would know how to form such a script. i know what scripts are just haven't done one at all yet. so i may be able to dress up my blaz'e text. though i did figure out the windowshade thing and that was cool seing my background through the console.

anywho thats it just to recap.

need info on creating script to dress up my text interaction.

please? =)
 
Old 07-08-2003, 07:59 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
No script needed, mate ... unless you
want to put the alias in ~/.bashrc and/or
~/.bash_profile

Try this one :)
Code:
alias lsc='ls --color=always'
and
Code:
man ls
should shed light on how & why ;)

Oh, btw, the reason I did it with THIS alias (lsc)
and didn't do (alias ls='ls --color=always') is that
the colorized output is "troublesome" for some
processes, I can't exactly remember what it was,
greping, I think...

Cheers,
Tink

Last edited by Tinkster; 07-08-2003 at 08:15 PM.
 
Old 07-08-2003, 08:05 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Welcome to LQ!

Sounds like your friend is trying to teach you with "Hard love"

To make your terminals show color, you simply need to call ls with --color on the end, so open up your terminal and type:
ls --color
And see all the colors come to life. Now everytime you ls do you really wanna type --color? Nah. So you open up a file in your home directory called .bashrc If one doesn't already exist, go ahead and create a new file, be sure it's in your current users home directory, so if you are logged in as masterc it's probably:
/home/masterc
And then using your favorite text editor, open up .bashrc (note the . before, this means it's a hidden file) and enter:
alias ls='ls --color=auto'

Save and exit, and now type:
source .bashrc

And try using ls. The colors should be radiating out at you

And to have bashrc sourced each time you open up a terminal, here's a thread I found using the excellent search feature (located in the upper right portion of the screen) here at LQ:
http://www.linuxquestions.org/questi...=source+bashrc

HTH

Cool
 
Old 07-08-2003, 08:46 PM   #4
Dach
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Hey thanks a bunch guys i'l give it a shot.
 
  


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
This is the END... Kanaflloric Linux - Hardware 6 10-01-2004 03:43 PM
the end is near pepsi General 6 06-13-2004 01:46 AM
I'm at the end of my rope! Sociologo Mandriva 56 03-22-2004 11:07 PM
safe_mysqld end PJHAMVS Linux - Distributions 10 11-02-2003 11:27 PM
End Task ? LosT ClusteR Linux - General 7 08-08-2003 10:52 AM


All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration