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/ which contains all the system-wide aliases.

Related Posts

Blog Traffic Exchange Related Posts
  • 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......
  • Kdirstat to track space hogs I'm putting this under the Windows tech support category because I've used this on a boot cd before to do the same for Windows as I'm about to describe for Linux. I need to clean up and organize my hard drive(s). But when it comes to actually deleting things you......
Blog Traffic Exchange Related Websites
  • An A-Z Index of the Bash command line for Linux From   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......
  • 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......
  • Contemporary Fireplace Design Ideas You have many fireplace design ideas to choose from when you're ready to add a beautiful fireplace to your home. Your final choice will depend on some factors like where you plan to put it and your overall floor plan. But no matter how big or small the room might......
PDF24    Send article as PDF   

Similar Posts

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

Comments are closed.

Switch to our mobile site