LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 04-08-2004, 01:33 PM   #1
surban99
Member
 
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian & Suse
Posts: 81

Rep: Reputation: 15
linux colors


my friends linux is all pretty, when he types ls he gets a color listing, i have to type ls --color even when i use ls --color=always i still only get color results once. apparently he's to 1337 to tell me
 
Old 04-08-2004, 01:47 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
your shell has a variable called LS_COLORS,
type
'env'

to see if you have it set.


ex.
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01
:cd=40;33;01r=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00
;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*
.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:
*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:
*.xpm=00;35:*.png=00;35:*.tif=00;35:
 
Old 04-08-2004, 01:56 PM   #3
schurt
Member
 
Registered: Nov 2003
Location: raleigh, nc
Distribution: fedora, arch
Posts: 78

Rep: Reputation: 15
just make an alias in your bashrc file
 
Old 04-08-2004, 02:08 PM   #4
surban99
Member
 
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian & Suse
Posts: 81

Original Poster
Rep: Reputation: 15
ok heres what i get

PWD=/
PS1=\h:\w\$
USER=root
MAIL=/var/mail/root
SSH_CLIENT=192.168.0.2 3955 22
LOGNAME=root
SHLVL=1
SHELL=/bin/bash
HOME=/root
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
SSH_TTY=/dev/pts/0
_=/usr/bin/env
OLDPWD=/root

now how do i edit it?
 
Old 04-08-2004, 02:16 PM   #5
schurt
Member
 
Registered: Nov 2003
Location: raleigh, nc
Distribution: fedora, arch
Posts: 78

Rep: Reputation: 15
think at the bottom of that file put

alias ls "ls --color"
 
Old 04-08-2004, 02:18 PM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
Code:
alias ls=ls --color=always
 
Old 04-08-2004, 02:21 PM   #7
surban99
Member
 
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian & Suse
Posts: 81

Original Poster
Rep: Reputation: 15
is that just a text file i can edit?
 
Old 04-08-2004, 02:27 PM   #8
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
yes, assuming you are using the bourne again shell (bash) this file would be .bash_profile
.login or .bashrc .

found by typing ls -al in your home directory.

add what the other posters had said to this file. and relogin.
 
Old 04-08-2004, 02:35 PM   #9
surban99
Member
 
Registered: Aug 2003
Location: Columbus, Ohio
Distribution: Debian & Suse
Posts: 81

Original Poster
Rep: Reputation: 15
Cool, thanks guys it was the .bashrc file in the root and all the color coding was just commented out
 
  


Reply



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
'less' keep colors Dankles Slackware 3 10-28-2005 09:20 AM
Mac OS "Colors" feature on Linux? gsandiford Linux - General 3 08-04-2005 10:41 AM
Mac OS "Colors" feature on Linux? gsandiford Linux - Newbie 1 07-07-2005 03:27 AM
vi colors prkn8tr Linux - Software 6 06-03-2004 12:43 AM
Linux Colors elitehaxor Linux - General 2 08-29-2002 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:58 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
Open Source Consulting | Domain Registration