Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze games gaming hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram random registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
color term

Reply  
Thread Tools
ulty's Avatar
Junior Member with 19 posts.
 
Join Date: Feb 2001
10-Feb-2001, 02:23 AM #1
I used to use slackware, and the default terminal was color, i.e. when you ran the ls command file names would be colored differently if they were normal files, or executable, or links, etc. I found this very nice. I run Redhat 6.0 now, and after reading a lot of man pages and documentation, I'm not sure how to get this color feature enabled.
MikeV's Avatar
Senior Member with 722 posts.
 
Join Date: Jul 1999
Location: Livermore, CA
Experience: Advanced
12-Feb-2001, 12:49 PM #2
Actually, I don't think that this is based on your terminal of choice. It's based on your configuration file for bash, your shell. There's actually a few, /etc/profile, /etc/bashrc/, ~/.bash_profile, and ~/.bashrc. We'll concentrate on ~/.bashrc...

Depending on what window manager you use (KDE, Gnome, etc.) you may also have a configuration script for them, too, but we won't worry about them. If you edit your .bashrc, it will affect every window manager, and command line, for that user. All you have to do is add an alias line to your .bashrc...

An alias will do exactly what it sounds like. Make one command do something else. Basically, it makes it easy to do stuff, so you dont' have to do commands with 142 switches on them. The command you want to use is <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>ls -aF --color[/code] which would be a pain to type every time you want to list a directory. So, to change the command, you can open a terminal and type <BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre><home/mikev/>#alias ls="ls -aF --color"[/code] which will fool the computer into thinking that the ls command is really the other command with the switches.

To make this a permanent change, just add the alias line to the end of your ~/.bashrc file.

(By the way, the ~ means 'your home directory" so ~/.bashrc would be /home/yourname/.bashrc)

Let me know if this helps!

-M

------------------
It is easier to get forgiveness than it is to get permission.

Linux: The Ultimate NT Service Pack
ulty's Avatar
Junior Member with 19 posts.
 
Join Date: Feb 2001
12-Feb-2001, 11:19 PM #3
Thanks for the reply. Actually, a few hours before I read it, I took a look at the Tips HOWTO and it had the alias ls trick in there, and I'm happy to report it worked well, and I can now see those purty colors.
MikeV's Avatar
Senior Member with 722 posts.
 
Join Date: Jul 1999
Location: Livermore, CA
Experience: Advanced
13-Feb-2001, 11:39 AM #4
Cool!!! Glad you got it taken care of.

BTW, since I'm usually pretty busy and don't have time to cruise the boards much, feel free to email me if you like... you'll probably get much quicker responses that way.

-M

------------------
It is easier to get forgiveness than it is to get permission.

Linux: The Ultimate NT Service Pack
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:03 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.