Tutorial

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

Force Quit Feature

In Ubuntu, it sometimes happens where a program locks up, and using the X or close button just doesn’t do anything. I frequently encounter this when k3b has a crashed burn. I’ve seen a few ways of closing it, but nothing as convenient as the close button. Several have suggested going to terminal and typing a command or three to close it. I think that’s just too much to ask, as I didn’t have to do that in DOS or Windows.

Fortunately, I found a shortcut that *is* as convenient as the close button. You can add a “Force Quit” button to your panel, by right clicking on the panel and choosing “Add to Panel“. You’ll see an icon that looks like a cracked screen. Drag it to where you want it on your panel, and you can use it when that pesky program just won’t go away.

Desktop
Edgy Eft
Feisty Fawn
Gnome
Tutorial

Comments (0)

Permalink