LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 03-28-2004, 03:22 AM   #1
Xavius
Member
 
Registered: Mar 2004
Posts: 107

Rep: Reputation: 15
how manage "alias" commands?


What's the file I should edit to modify (add, remove, change) alias commands on linux?

(I know I can use the alias command, but I'm interested in edit config files)
 
Old 03-28-2004, 05:19 AM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
you could slap them in $HOME/.bash_profile
or to make the alias global for all users, /etc/rc.d/rc.local
 
Old 03-28-2004, 05:58 AM   #3
Xavius
Member
 
Registered: Mar 2004
Posts: 107

Original Poster
Rep: Reputation: 15
thanks a lot, but please how I should edit the files?
can you tell me the sintax I should use (with an example)?

Thanks!!!!!!!!!!!!!!!!!
 
Old 03-28-2004, 06:04 AM   #4
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Rep: Reputation: 30
You'll need an editor, like nano, vi, gedit, kwrite or whatever. I like nano myself, very easy to use, but don't know if you have installed it. Vi is installed on most systems. You can do it from the commandline by:

vi $FILE

to edit your file. In your case, open the shell, cd to your home directory (if you aren't there already), type "vi .bash_profile".

Or if you don't like working from the shell, open gedit or kwrite. Open .bash_profile from gedit or kwrite, and edit...

By the way, the file .bash_profile could be named .bash_rc too.

Succes!
 
Old 03-28-2004, 06:22 AM   #5
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
Quote:
Originally posted by qwijibow
or to make the alias global for all users, /etc/rc.d/rc.local
Does this apply on all distros?
 
Old 03-29-2004, 05:20 AM   #6
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
yes, that apply's to all distro's.

the syntax is the usual command line BASH stuff, (like you would type into a command line)
 
Old 03-29-2004, 01:58 PM   #7
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Not necessarily all distros....
SuSE uses /etc/init.d instead of /etc/rc.d, and for global aliases you can use /etc/bash.bashrc or /etc/bash.bashrc.local
 
Old 03-29-2004, 04:19 PM   #8
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
lol... close enough then
 
  


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
What does echo alias "char-major-10-224 off" >> /etc/modules.conf do? abefroman Linux - Software 2 09-16-2009 11:10 PM
commands "init" and "modprobe" not working Diagmato Fedora 2 07-23-2005 12:44 AM
what is difference between "reset" and "clean " commands? zameer_india Linux - Newbie 2 01-10-2005 07:23 AM
bash equivalence of tcsh "alias em "emacs \!:1 &""? rgiggs Slackware 3 07-29-2004 03:07 AM
"depmod" and "modprobe" commands don't work The1PatO Fedora 7 06-10-2004 01:10 PM


All times are GMT -5. The time now is 04:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration