« June 2012 | Main | August 2012 »

July 15, 2012

Linux Mint: From scratch - Part V

This column's all about the terminal and using command line commands. If you rush off screaming, it's probably because you've only ever encountered the (shudder) DOS terminal terminal in Windows. Let me tell you, the Linux terminal is way more advanced -- and way easier to use.



Click Applications > System Tools and you'll find Linux Mint has a choice of two terminals: UXTerm and XTerm. Frankly I can't see the difference between them, so start either one and we'll use it to install a much more sexy terminal.

One of the cool things about Linux terminals is what's known as Tab Completion. Enter a few characters, hit the <Tab> key, and the terminal will complete the command for you if those keys are unique.

Try it out. Type hostn in a terminal then press <Tab>. It'll auto-complete to hostname (since there's only one command beginning with hostn.



Now just try host. One <Tab> produces nothing -- an indication it's not a unique command -- but a second <Tab> will produce a list of possibilities and repeat the command so that you can narrow down your selection ...



To see the full power of this, just type h followed by <Tab> <Tab> and you'll get a list of all the possible h commands:



But tab completion isn't just restricted to commands. It's intelligent enough to recognise command parameters and file names too, so you can actually key in what look like long, tricky commands really quickly. Try this:

fir <Tab> /u <Tab> /sh <Tab> doc/nan <Tab> f <Tab>

What you should end up with is a command line that looks like this:

firefox /usr/share/doc/nano/faq.html

Simple, eh?

If you mess up a command or simply want to repeat a previous command, hitting the <Up Arrow> and <Down Arrow> keys will let you scroll through previous commands.

The mouse can also be used in the terminal to copy and paste text. Select a piece of text -- even outside of the terminal -- then click the middle mouse button anywhere in the terminal window and whatever you've selected will be pasted at the command line cursor. Wow!

As you're probably starting to appreciate, the terminal's a really easy way to do a lot of things in Linux. It's also makes describing how to do things a lot easier. I'm about to get you to install a new software package, and I could do so by saying "Click on Applications / Other, choose Sofware Manager then ..." but that only applies to the Gnome version of Linux Mint. If you're using the KDE flavour, the commands will be different. But not in a terminal! In fact the terminal commands for Mint will work in any flavour of Linux based on Debian -- which includes all versions of Ubuntu, Xandros, Knoppix, BackTrack, Damn Small Linux, etc. And with some slight adjustments, they'll work in pretty much all other Linux distributions too -- even on the Mac (which is actually based on another flavour of Unix called BSD).

So here we go. Time to install a sexier terminal. Enter the command:

sudo apt-get install guake

Or if you're running the KDE version of Mint:

sudo apt-get install yakuake

You can start the program by simply entering guake & (or yakuake &) on the command line. Now hitting <F12> will toggle the program.


Regular Mint users:
  • Configure Guake under Applications / Other / Guake Preferences. Personally, I like to wind back the transparency a little (under the Appearance tab).
  • Now visit Applications / Other / Starup Applications and tick Guake Terminal so it starts every time you boot.


KDE Mint users:
  • Configure Yakuake by clicking the Open Menu button in the bottom right-hand corner of the window. I prefer a Width of 80% and a Height of 40%. You'll find sliders for these, and many more settings, under the Configure Yakuake menu item.
  • Now click the K-menu button, start System Settings and choose Startup and Shutdown (under System Administration). Ensure Autostart is highlighted, click Add Program and select Yakuake from the System menu item to start it automatically each time you boot.

We'll look at some more command line fun next time ...

Follow Geoff Palmer on Twitter

July 11, 2012

Watch those names!

Sound security advice from NewsBiscuit ...

Popular pet names Rover, Cheryl and Kate could be a thing of the past. Banks are now advising parents to think carefully before naming their child’s first pet. For security reasons, the chosen name should have at least eight characters, a capital letter and a digit. It should not be the same as the name of any previous pet, and must never be written down, especially on a collar as that is the first place anyone would look. Ideally, children should consider changing the name of their pet every 12 weeks.

Expectant mothers have also been advised to choose carefully where they give birth. Anywhere that has a place name is best avoided. These are listed on maps, which are freely available on the Internet.

It’s a good idea too, security experts have warned, for children not to get friendly with certain teachers. For instance, Miss Smith may be enriching your son’s education but he should try and see if he can’t make a favourite of Father O’Grinnighan-Scythe II, even though it may mean a lot of staying late.

We tried to call Barclays’ security expert R0b Ste!nway for a comment, but he was not available for 24 hours, having answered his phone incorrectly three times in succession.



Follow Geoff Palmer on Twitter
Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.