Skip to content

Linux: command aliases are the s*** :)

Since I’m getting seriously fed up with the way Ubuntu messes with the UI, I recently gave a try at Debian. One of the first thing the struck me was the unavailability of the ‘ll’ “command”. After digging a bit, I found that this is technically not a command but just an alias. And aliases can be created quite easily. For instance for ll, you’d just need to type the command:
alias ll='ls -l'

To make the alias permanent, you should add it to your ~/.bashrc file. Depending on the distribution and on the user, this file may also contain other interesting stuff. I ended up uncommenting the whole following block, so as to have the ll and l aliases, as well as colorized file names:
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'

You can also add some time-saving commands. For instance, I find it a hassle to often type apt-get update and apt-get upgrade so I added this:
alias au='apt-get update && apt-get upgrade'
Now no excuse not to upgrade often 😉

– if you want to configure aliases for all users at once, you can set them in /etc/profile instead of each individual .bashrc file.
– changes will apply once you reconnect to SSH (maybe you’ll need also to do /etc/init.d/ssh reload, but not sure)

Source (with a nice other idea to save more typing with alias): Terzza – Linux “ll” command / alias

Posted in Linux.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA