Suite101

Customizing Unix


© Robin Friedman

Ok, so you have Unix running, you can navigate and maybe even play some games, but it just doesn't feel like home. Luckily, there are several ways to customize Unix, making it easier to get around and placing little things to amuse you.

The first thing you may want to do is change your commands. ls -l will list your files with security details, and ls --color will, on most systems, list them in color (If you're on the physical machine). You can set these as default for ls!

Go to your home directory, on most systems by typing cd ~ . Then type ls -a or ls -l , to list the files starting with a period. You should see .bashrc if you're using the bash shell, which is basically the standard. Open it, or create it if it doesn't exist and you're using bash. In this you can add aliases or functions, lets take the example above and I'll show you what it would look like:

# .bashrc <-- That is a comment

alias ls='ls -color -l'

You can change this for any command, or you can create your own. Say you want to make a command, games, that will go to the games directory. Simply put:

alias games='cd /usr/games'

Then simply type games (after logging in again)! You can also set a program to start every time you login. Simply type the program path into .bashrc , as in: /usr/games/fortune

Fortune, also known as Cookie, is a program that displays a random message, a popular favorite for logins.

So far this is all personalized for one user. If you have root, or administrator access, you can edit /etc/motd , which is a message of the day, displayed upon login for all users.

Advanced users can change the PATH and other environment variables in .bash_profile in the home directory.

This is a great way to make yourself feel comfortable in your system, and also to make shortcuts for commands that you use often. Use it to save you time!

Go To Page: 1


The copyright of the article Customizing Unix in Linux/Unix is owned by Robin Friedman. Permission to republish Customizing Unix in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo