Tips of the Trade

Don't have time to plow through a full-blown tutorial? Check out our collection of quick tips designed to make any sys admin's life easier.

Enabling Server Validation for Windows and Android 802.1X Clients

Discover how server validation for 802.1X clients can help ensure your users reach the correct RADIUS server and avoid being duped by fake servers set up by hackers.

Using a Physical Hard Drive with a VirtualBox VM

While it can be useful at times to directly mount or boot a physical drive on a VirtualBox virtual machine (VM), the process for doing so isn't always straightforward.

Start Taming Your Mutt

Mutts can be lovable companions, but they still must be trained. The same is true of the Mutt mail client. Out of the proverbial box it's a powerful mail client, but that's nothing compared to what you can do with a well-trained Mutt.

Use Logger to Write Messages to Log Files

Want a quick and easy way to write to system logs? Check out logger, an shell utility that works with syslog. Don't let its ease of use cause you to overlook its value.

Using msmtp as a Lightweight SMTP Client

Need a quick and dirty replacement for Sendmail or Postfix? Running Mutt and don't want to set up a full-blown MTA? Consider msmtp, a lightweight SMTP client with a Sendmail-compatible interface.

Use OfflineIMAP to Sync Email on the Go

Having a working email system in place is key to the lifeblood of most system administrators. Those looking beyond Outlook will find much to like in Mutt, particularly OfflineIMAP, whose functionality is exactly as its name implies.

Generate Secure Passwords With Pwgen

Coming up with good passwords is never easy. Enter Pwgen, a utility that generates random (but pronounceable) passwords.

Setting Up Linux Cgroups

Initially developed to limit resource usage in the Linux kernel, cgroups can do much more than that. Unfortunately, as handy as they are, cgroups are neither straightforward nor user friendly. Scaling the learning curve to set up and manage them is well worth it, however. These basic tips will get you started.

Introduction to Linux Cgroups

Cgrpoups is a feature initially developed to limit resource usage in the Linux kernel. But it can do much more, including tweak memory, bandwidth and CPU usage of system processes as well as deny access to system resources.

More Yum Plugins: Security and Package Priority

Yum Plugins make it easy to extend the open source tool's functionality. The security plugin and the priorities plugins are a great place to start.

Two Open Source Software Alternatives to Cron

Looking to avoid Cron? Hcron and the at utility are two tools that make it easy to bypass Cron in favor of other open source software alternatives.

Using Powertop to Lower System Power Usage

If you've been wondering what's sucking the life out of your Linux laptop's battery or driving those higher electric bills in the server room, be sure to check out Powertop. The popular Linux tool profiles systems to help determine which programs are using the most power.

Using Taskset for Priority Tasks

A tisket, a tasket, be sure to use the open source server tool taskset for priority tasks.

Easy Crontab Editing with Corntab

Not an expert on cron? No need to worry -- just use the Corntab site or its iPhone app.

Using lsof to Find Open Files

lsof is one of the most useful utilities for Linux and Unix systems. At its most basic, lsof can help identify which files are being used by any given application and which network ports are open.

Check Apache Server Status From a Web Page

Want to see how your server is doing without SSH'ing into the system? One way to do this is to set up a Web page that shows the status of your Apache server. Here's how to get started.

Adding Users and Aliases for Postfix

Postfix is a great mailer, but if you're new to administering it, finding your way around can be difficult. Here's how to get started.

Absolutely Essential Vim/vi Commands

When it comes to remote system administration, all roads lead to Vim. While Vim's capabilities are vast -- entire books have been written about it, and they still fail to capture all of its functionality -- knowing a handful of commands will enable you to do much of what you need to do.

Using Strace to Trace Problems

If you're having trouble figuring out why a program keeps crashing and burning, consider Strace, an easy-to-use diagnostic tool. More experienced users will find Strace handy for performance testing and more.

Meet Open Source Server Messaging Needs With GroupServer

Need both mailing list and forum software but don't want to chose one over the other? Consider this open source server hybrid.

Byobu: Like Screen, but Better

Enhance Screen on your screen with Byobu, open source software that makes Screen more user friendly and functional.

PuTTY in Your Hands: Open Source Software Mail Solutions

Mutt and PuTTY are a great open source combo for managing mail, but they're not without their failings. Here's a quick tip for using PuTTY to fix problems with line-drawn characters in Mutt.

Open Source Windows SSH Client Delivers Security Boost

The Windows SSH client, PuTTY, is incredibly useful and becomes even more so when set up with a private/public keypair.

Identifying Disk Space

When disks fill up, strange errors occur. Determine if and where you have a disk space shortage, and learn how to resolve it.

Open Source Software Scripting in Vim

Get even more out of the open source software editor, Vim, by taking advantage of its scripting capabilities.

Open Source Software Shortcuts for Doing More with 'Less'

Command-line users are often well-acquainted with Less, More's backward-scrollable cousin. Here are a few not-so-well-known useful commands and shortcuts that may make Less even more valuable to you.

Accessing WebDAV as a Filesystem With davfs2

Most admins know WebDAV, but davfs2 isn't as well known. With this open source software tool, you can connect to WebDAV server as a regular filesystem, thus allowing applications that don't support WebDAV to access shared resources via WebDAV.

Unstaging Files in the Open Source Software, Git

Life may not come with an undo button, but fortunately open source software does. With the open source software, Git, it's all too easy to unintentionally commit a file. Fortunately, it's also easy to turn back time.

Easy Redirection of Sudo Output

With Sudo, a sys admin can allow certain users to run commands as root or another user while providing an audit trail of the commands and their arguments. Unfortunately, increased privileges usually apply only to the first command typed. Here's how to extend them to any input or output redirection.

3 Handy Commandlinefu One Liners

Commandlinefu is a simple repository for storing and sharing shell commands with the rest of the world. Here are three new command-line one liners that stand out.

Get the Most Out of Bash History

Tip of the Trade: Type 'history' at the Bash command prompt, and you'll get a list of your previous commands. Sure, you can scroll up and down to find the ones you're looking for, but did you know there are faster ways to find what you need as well as handy shortcuts to making use of them.

iPad meets Open Source With Help From WebDAV for Apache

Tip of the Trade: With GoodReader, iPad meets open source, and files can be shared between the popular tablet and a computer.

Email PDFs From the Command Line With Open Source Software uuencode

Tip of the Trade: Uuencode is a command-line oneliner that saves you time by piping attachments directly into the mail command.

Setting Up Tunneling With a VirtualBox Guest Machine

Tip of the Trade: VirtualBox makes it easy to set up and run virtual machines on your own desktop. It is not perfect, however, and by default, the guest VM is invisible to the host or any other machines on the network. Here's an easy way to relay instructions to it.

Crontab Entries for Unix or Linux Servers Made Simple

If you've ever had to stop and check the manpage to get the crontab syntax correct for your Unix or Linux server, here's a Web site that will save you lots of time.

Shiny, Happy Linux OS Terminals With Bashish

Tip of the Trade: With spring in the air outside, why not add some color to your Linux OS powered terminals? Bashish offers a fun and simple way to add themes to your terminal.

Linux Server Fix: Backspacing on OSX Terminal Should Not Be Interpreted as Delete

Tip of the Trade: Backspace and delete may seem the same, but often they are not. This is particularly problematic when using Screen on OSX Terminal. Here are three easy fixes.

Ignoring Files and Directories in Subversion for Easier Linux Server Management

Tip of the Trade: Finding a way to ignore files or directories in Subversion so they are not included in svn status output is easy; figuring out the exact syntax is not. Here's are way to simplify this Linux server management quagmire.

Set Up a VNC Linux Server in 5 Easy Steps

Tip of the Trade: VNC makes it easy to log into a full desktop on a remote server. Follow these steps, and your Debian Linux server will be up and running in no time.

Making Linux Server Directories More Readable, Add to Perl's @INC Array

Tip of the Trade: Anyone who has encountered the Perl @INC array in the context of a 'cannot find module' error knows the value of being able to see a list of directories on you Linux server. Here's how to access @INC and find obscurely located modules before they are lost.

Meta on a Mac Delivers Efficiency Boost

Tip of the Trade: Tired of stretching your fingers to hit the ESC key on your Mac? There's a simple way to fix that.

Tweaking Linux Library Settings Within Readline

Tip of the Trade: Readline is the library that handles Linux command-line input as well as input for applications. Most of the default settings work perfectly well, but some change the way tab-completion behaves and thus require modification.

Resolving the /etc/hosts localhost Issue in Apache

Tip of the Trade: The default values in /etc/hosts used in several Linux distributions have long been known to cause issues. Here's how to fix them in Apache 2.

Shell Scripts and Here Documents

Tip of the Trade: A here document, or heredoc, is one way to get text input into a script without feeding it from a separate file. If the data or script is complicated, however, keeping the two separate is generally a better idea.

Monitoring Disk Usage With Iotop

Tip of the Trade: Hard disk thrashing? Check out Iotop, a Python program similar to top that enables you to keep an eye on disk I/O.

6 Really Cool Linux Stocking Stuffers

Tip of the Trade: Feeling like the only one stuck in the office this week? Here are some Linux command-line 'Christmas' Eggs to help you while away the hours.

'Tis the Season: The Perl Advent Calendar

Tip of the Trade: Less chocolatey, but more useful. Since 2000, the Perl Advent Calendar has been providing a useful Perl module each day from December 1 through Christmas Eve.

More Special Variables in Perl: Outputs

Last week we looked at special Perl variables for reading things in; this week we look at the other side -- variables that are useful when you want to write things out.

Dealing With Records in Perl

Tip of the Trade: Perl is a great tool for reading in information from a file. Several useful special variables can be used to neaten up code or alter the default behavior when reading in records.

Dealing With Strange Filenames

Tip of the Trade: Have typos in your email file names. Hey, it happens to the best of us! Normally, it's an easy fix, but if you have a file with a name starting -, it's not so easy. To fix this, you need an escape sequence for rm itself, not the shell.

Laptop Backups With anacron

Not every scheduled task can take place on an always-on machine. For those we have anacron. With anacron, like cron, you schedule a job to run at specific intervals. Unlike cron, when the computer is switched on the anacron daemon checks whether a task should have run and if one was, it runs it.

Dealing With Mail in Mutt

Tip of the Trade: The command-line mail client mutt may be old school, but it features a wide range of keyboard commands that can be used for various useful tasks.

Saving ssh Keys on Mac OS X Leopard

Tip of the Trade: ssh-agent makes it possible to avoid having to type in a passphrase for each login. Helpfully, since the Leopard release on Mac OS X this functionality is built straight in.

Automatic Indenting With Vim

Tip of the Trade: Indentation may seem an insignificant step when coding, but Vim makes it automatic with its indent option, indentexpr. This powerful yet flexible tool indents based on expression.

Forwarding a Postfix Virtual Alias to /dev/null

Tip of the Trade: Sometimes you want to use a "do-not-reply" type of email address and you don't want to have to mass-delete the mailbox at intervals. Here's an easy way to add a Postfix virtual alias to /dev/null.

Matching Newlines in Vim

Tip of the Trade: Want vim to share newlines? You're only two characters away.

Linux Google Chrome Shines

Tip of the Trade: When it comes to Linux, Google Chrome may be far from gold, but it sure is shiny -- and fast.

Graphical Disk Usage With Baobab

Tip of the Trade: If df and du are getting you down, consider Baobab. This graphical alternative, installed by default in most Gnome-based Linux distros, gives you a clear picture of your disk usage.

Topics for Mailman

Tip of the Trade: Juliet Kemp discovers and explores Topics in the mailing list server, Mailman. With Topics, subscribing to a list becomes more than an all or nothing proposition.

The Many Uses of Screen

Tip of the Trade: There's much to love about Screen. Besides enabling cutting and pasting, the utility can be used to monitor a window for output, mirror another session, lock the screen and more.

Cut and Paste With Screen

Tip of the Trade: Mouse-clicks may be synonymous with cut-and-paste, but in a non-graphical environment, they won't help you. Enter Screen, which among its many useful tricks, enables non-graphical cut-and-paste.

Why Cron Is Better Than a String Around Your Finger

Tip of the Trade: Mailing reminders to yourself is an easy way to remember something that easily slips your mind. Using Cron with mail is one way to facilitate this.

[e|c]tags With Emacs and Vim

Tip of the Trade: With exuberant-ctags you can take advantage of any IDE's source code navigation features -- without ever leaving the comfort zone of Emacs or Vim.

Run Multiple Debian Versions Simultaneously

Tip of the Trade: Meet apt -- the best-kept secret for keeping up with the Debian release cycle.

Bash, in Color

Tip of the Trade: A little color on the command line makes things easier to read.

Mutt on the Android G1

Tip of the Trade: An adapted version of ConnectBot makes it easier to access email on your mobile devices using Mutt and SSH.

Tail More Than One File at a Time

Tip of the Trade: MultiTail makes it possible to watch two files simultaneously in real-time.

System Monitoring With Atop

Tip of the Trade: Atop makes it easy to keep on top of system monitoring. This useful tool displays system load information alongside process information in a style similar to top.

Useful Tricks With Screen

Tip of the Trade: Screen brings multiple console screens to the same window, enabling several tasks to be performed simultaneously and simplifying troubleshooting.

Make It Snappy With Vim

Tip of the Trade: Learn how to set your own abbreviations and mappings in the ever-useful Vim.

Unicode Characters in Vim

Tip of the Trade: The editor Vim supports unicode natively. There are three ways to take advantage of unicode's capabilities via Vim. The one that's best for you will depend on your setup and needs.

SSH From Your Mobile Device

Tip of the Trade: Today's mobile phones and PDAs deliver sophisticated data and internet connectivity, making it easy to keep an eye on your servers while you're out and about.

Recovering Deleted Files With lsof

Tip of the Trade: Accidentally deleted files are easily recovered with lsof.

The Various bash Prompts

Tip of the Trade: Most likely, you already have a personalized setting for PS1, the default bash interaction prompt. Here's what to do with PS2, PS3 and PS4.