May 2007

bash Wednesday - alias

One of the best tips I can give on using the command line to your advantage is to grab a hold of the “alias” command. You’re going to be typing a lot of commands, and with Ubuntu, through the bash shell’s glorious “alias” command, they’ll be fewer and shorter.

The alias command allows a shell user to provide their own set of alternate commands for commonly keyed instructions.

The default install of bash includes a few basic aliases, some different modifications of a regular listing of files. Try “ll” for example. While it’s not a command included in Ubuntu and no binary exists for it, the command still provides a more verbose listing of the files. That’s because bash has already defined that alias for you (unless you’ve removed it).

I use the command to make it easy to start and stop my mail server.

alias fymail='vmware-cmd /home/vmware_machines/fymail/fymail.vmx'


Afterwards,

I can use

fymail start

or

fymail suspend

It may take a little practice and some experimenting, but they save me a lot of time and keystrokes.

You’ll want them to load in your startup of course, so I suggest using

gksu gedit ~/.bashrc

to save your alias commands for future sessions.

Shell
Tips & Tricks
Tutorial
VMWare
bash

Comments (0)

Permalink

The Command Line - Your Computing Co-Pilot

If you’ve only used Windows, it’s possible you may have neglected one of it’s best hidden gems, the Windows Command Line. While it was very powerful and had many features, it wasn’t quite what Linux and Unix users had been reaping the benefits of for years. It extended upon the original DOS command set, which was always limited to begin with.

Now that you’ve become interested in a Linux distribution, learn early on to integrate your work liberally with the use of the shell’s command line, and you’ll quickly discover you will be saving yourself a lot of time *and* frustration.

The shell’s very powerful, and I obviously can’t cover everything here in this one post, expect to see more helpful guides as far as simple as  keystrokes, an array of helpful commands, aliases, links, on to more advanced topics like scripting.

Shell
Tips & Tricks
bash

Comments (0)

Permalink