More Command Line Interface Magic…. Aliases



Enterprise Linux has a good article on some handy aliases under linux that can make CLI usage much more handy. The only warning I would have is to be careful that an alias you want to create doesn’t conflict with another useful program. (One of the comments noted that ld is the executable of the linker).


If there are aliases that are frequently used (or you commonly mistype)…
alias cd..=’cd ..’

Typing alias at the command prompt gives the list of current aliases, entering the above would alias the typed cd.. to mean cd ..

It can be very handy, although you can do dumb things with these… let’s say you’re reckless and rely on rm asking “are you sure you want to delete” and then rm get’s aliased to rm -f (or worse rm -rf…)

So, think carefully about these possibilities.

The hardcoded list of aliases for most distros can be found in your home directory in the .bashrc file.

System wide aliases on many distros are kept in /etc/bashrc (my .bashrc checks that for systemwide stuff.) On Mandrake/Mandriva, aliases come from the /etc/profile.d directory (/etc/bashrc looks in this directory for anything ending with a .sh) Among these can be path modifications, or aliases, such as the file /etc/profile.d/alias.sh which contains all the system-wide aliases.

Related Posts

Blog Traffic Exchange Related Posts
  • Windows XP Unable to Login After Cleaning Out Rogue Antivirus This article may come in handy if you are out there battling the latest rogue du jour. Occasionally I have been through a cleaning process for these rogues and got to a point where the scanner had run and cleaned things out (whether it was malwarebytes antimalware or superantispyware.) It......
  • Merging PDF documents in linux Recently I had a dillemma of sorts. I had a document that had printed to pdf.... each page to it's own pdf. I didnt' have time to spend figuring out how to make the document print to one multi-page pdf and so it seemed like it should be pretty easy......
  • Linux Livecd Download This should probably go in the Windows tech support category too... but, as I've talked about before I've spent a good amount of time using different linux livecd's. I've even made a few livecd's of my own with Mandrake (now mandriva) linux, using the mklivecd scripts. One of the nice......
Blog Traffic Exchange Related Websites
  • Ten Steps To Become a Linux/Unix Geek Until recently, Linux/Unix was considered OS of the geeks. However, with GUI and more desktop Linux distributions, things have simplified on both Linux and Unix. Still you can geek out with Unix/Linux using its terminal. Just follow the steps below to master the terminal. 1. Never used Linux! Get Ubuntu......
  • Investment Landscaping with Perennials When you plant a flower, you are making an investment into the future. Certain plants will work well with others, and some will require completely different ground nutrients. So when it comes to planting new flowers, it is like putting money into a savings account or stocks. Play it smart.......
  • An A-Z Index of the Bash command line for Linux From SS64.com:   adduser Add a user to the system addgroup Add a group to the system alias Create an alias • apropos Search Help manual pages (man -k) apt-get Search for and install software packages (Debian/Ubuntu) aptitude Search for and install software packages (Debian/Ubuntu) aspell Spell Checker awk Find......
PDF24    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site