Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Creating a permanent global alias?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lumpy_bd
n00b
n00b


Joined: 24 Sep 2004
Posts: 3

PostPosted: Fri Sep 24, 2004 4:34 pm    Post subject: Creating a permanent global alias? Reply with quote

Hi all.

Just installed Gentoo 2004.2 with gentoo-dev-sources-2.6.8 kernel. Got XOrg installed, and even got KDE up and running... not bad for a first timer eh? :D

One thing... when i type
Code:
ls
i get boring old grey text listing the contents of my folder. Now if i type
Code:
ls --color=auto
things get a lot more funky; we got dark blue, light blue... we even got green!! Pretty colours (Yes, "colours; im not American :P )=A very happy me :D .
But... wait, here it comes... how do I make every
Code:
ls
act like an
Code:
ls --color=auto
?

I have tried using an alias:
Code:
alias ls='/bin/ls --color=auto'
but that only works for the current terminal session that i'm in. If I change terminal, log out or reboot, I have to do it again. Is there any way to make it permanent across all terminals for all users?

P.S. I have tried adding
Code:
alias ls='/bin/ls --color=auto'
to my /etc/conf.d/local.start file, to no avail... any other suggestions?

Cheers in advance

Brett
Back to top
View user's profile Send private message
joeljkp
Guru
Guru


Joined: 06 Mar 2004
Posts: 316
Location: Starkville, MS, USA

PostPosted: Fri Sep 24, 2004 5:27 pm    Post subject: Reply with quote

Hmm... it sounds like you're using root to do this? Does it display colors as a normal user?

If you want 'ls' to act the same way for every user on the system, put your alias line in /etc/profile. That file gets read every time you open a new shell.

If you want to change it for a specific user, create (or edit) your ~/.bashrc file and put your alias line in there. I believe for normal users, there's already a good .bashrc in the home directory, so you can just edit that.

If you want an already-made .bashrc for root, copy it from /etc/skel to /root.
_________________
Catch me on Jabber: joeljkp@jabber.org
Back to top
View user's profile Send private message
Minox
Apprentice
Apprentice


Joined: 12 Apr 2004
Posts: 188
Location: Germany / Munich

PostPosted: Fri Sep 24, 2004 5:31 pm    Post subject: Reply with quote

Greetings,
check /etc/profile and run source /etc/profile; env-update
and ~/.bash_profile
and ~/.bashrc

Kind regards,
_________________
:!: proud to be 100% M$ free :!:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum