Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linux Tip 'O the Day
Message
 
To
All
General information
Forum:
Linux
Category:
Other
Title:
Linux Tip 'O the Day
Miscellaneous
Thread ID:
00436539
Message ID:
00436539
Views:
46
Bash aliases.

So you do some of the same commands all the time.

ls -F --color

ls -al

cd /usr/local/apache/htdocs/html-www

Why waste time typing them in all of the time?

Enter .bashrc.

Inside your .bashrc you can use the "alias" command.

alias ls="ls -F --color=auto"
alias goweb="cd /usr/local/apache/htdocs/html-www"
alias ftp=ncftp
alias dumbterm="export TERM=vt100; telnet dumbhost.domain.tld"

You can alias just about anything. Even commands that already exist! (see the ls example) Remember that you can separate multiple commands with a ';'. (see the dumbterm example)
Remember that the .bashrc only gets read on login. So say:
. .bashrc
To read changes in the file.

Or just logoff and back on.

j
Jason Bradley Nance
jbnance@tresgeek.net

Got root?
Reply
Map
View

Click here to load this message in the networking platform