CentOS 6 Setup Guide

Various

Defining useful aliases

Most shells (we use bash) allow the user to define so called aliases. Those can be used to define alternative names around existing ones. I usually tend to include the ones defines below in my config.

nano ~/.bash_aliases

alias ll='ls -l'
alias la='ls -A'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'

The later aliases add confirmation prompts to "dangerous" commands.

Setting the default editor

Everyone has their own favorite editor. Mine is nano, so I define it to be the default editor for my shells.

nano ~/.bash_profile

export EDITOR="nano"

Possible alternatives are vim, pico etc.

Nice crontab columns

We can add some nice comments to crontab, which makes it easier to read what is done, when.

nano /etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed

Add the same to crontab -e (but this time without user-name column and the variable definitions on top).

Installing useful packages

Beside tmpwatch which makes sure temporary files are cleaned from time to time, we install some other fresh packages:

yum install tmpwatch tree

Some nice tools to monitor network bandwidth/throughput:

yum install nload nethogs

Last but not least an alternative CLI mail application.

yum install alpine

Make sure to check the Appendix chapter. It contains some guides on how to compile packages from source, like task-spooler - an extremely useful one as well.