LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-19-2006, 06:36 AM   #1
extrasolar
Member
 
Registered: Feb 2004
Location: Northamptonshire, UK
Distribution: Windows XP, Arch Linux
Posts: 131

Rep: Reputation: 16
Adding system-wide aliases


I'm trying to add some system-wide aliases so that they are available for every user.

I've read to put them in /etc/bashrc

So I insert:

Code:
alias 'ls=ls -F'
Log-out and log back in, or reboot.

type ls and it still does the usual ls.

Exactly where do I add them and am I using the correct syntax?

Cheers.
 
Old 07-19-2006, 06:41 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could edit /etc/profile. Examine your system, because there may be a file called something like "aliases" that is sourced by /etc/profile. The "info bash" manual contains information on login scripts that bash uses.
 
Old 05-10-2007, 02:27 AM   #3
Oupa
LQ Newbie
 
Registered: Apr 2007
Location: Welkom, South Africa
Distribution: RHL + Mandriva
Posts: 15

Rep: Reputation: 0
aliases

The /etc/bashrc is the correct place for system wide aliases for the bash shell. Your quotes are not quite correct. To create an alias lf:

alias lf='ls -F | more'
You can decide whether you want it to pipe to the more command or not. Oupa.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding permanent aliases to profile cnc Ubuntu 5 05-11-2007 04:46 AM
System wide KHTML colors ProtoformX Linux - Software 1 04-02-2005 10:13 AM
System Wide Permission lmanwarren Linux - General 1 03-29-2005 08:15 PM
adding aliases, refreshing .bashrc NonSumPisces Linux - Newbie 8 06-25-2004 11:39 PM
*system-wide* KDE install, how? webvandals Linux - Software 5 03-05-2004 11:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:37 PM.

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