Introduction to customizing your UNIX Session
This module describes common ways you can customize the UNIX environment. Because you talk to UNIX through the shell, you will learn how to take advantage of the C shell features used to customize your UNIX environment.
By the end of this module, you will be able to:
- Create and manage aliases
- Use the history feature to work with previous commands
- Customize your system prompt
- Use the .cshrc file to store your C shell settings
In the next lesson, command shortcuts using the alias command will be discussed.
You can customize the UNIX shell to save time, to save typing, and to adapt to your style of work.
Shell startup files capture your preferences and recreate your shell environment session after session, even machine to machine.
If you work with a tool long enough, you master its purpose. Moreover, the tool becomes an extension of yourself.
If you are a virtuoso, your tools of the trade effortlessly channel your intent, spirit, and expression to your medium.
By now, I hope your skills have reached those of a UNIX ninja. You practice your command-line katas and consult the oracle of man (Not the Oracle TM) when you crave knowledge.
And you craft command combinations that perform sheer alchemy on data. You are at ease at the command line, and the shell feels comfortable and familiar.
In X, one of the most important windows is a terminal window. A terminal window has a UNIX session inside with a shell prompt, just like a miniature terminal. It is a CLI, from where command lines can be typed in and executed.
It is just like the command prompt window in Microsoft Windows. Several terminal windows can be running at the same time, each doing something different.
To enter a UNIX command or answer a prompt in a window, set the focus the terminal window and type a command or something appropriate.
Programs in other windows will keep running; if they need input from the user, they will wait just as they would be on a standard terminal. There are several programs that make terminal windows. One of the bestknown programs is xterm.
Others include GNOME Terminal and konsole.
All do the same basic job: they allow the user to interact with UNIX from a shell prompt. If it is entered at the prompt, a UNIX command runs just as it would be on a terminal that is not under the X Window System.
To start other X-based window programs (X clients), it can be done by entering the program's name at a shell prompt in any terminal window.
But it is a better way just to start new programs all from the terminal window that was open first. The reason is that if the shell has job control
it is easy to find and control all the other programs and their windows. Another important operation should be noticed. When using a terminal window in which a program is already running,
note that resizing the window may make trouble to the program currently running in it. It is best to set the terminal window size before running a program.
Also, remember that standard terminals are 80 characters wide. If editing text in a window with a width that is not 80 characters, it can cause trouble later when the file is viewed on a standard terminal
Some programs, such as ls, need to display in a fixed-width font, where every character is the same width.
If the terminal window is set to a variablewidth font, the columns will not line up correctly. So it is recommended to use fixed-width fonts, such as Courier, for terminal windows.