< Day Day Up > |
The most powerful and flexible administration tool on almost every UNIX-like system is the shell. The standard shell in a SuSE SLES for pSeries 8.0 is the Bourne again shell, or bash. It is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. Most sh scripts can be run by bash without modification. Command historyThe standard history mode on bash is emacs; to view all of the current settings of the shell, issue the set -o command: # set -o If you are more comfortable using vi than the emacs mode, use the set -o vi command. The default history size is 500 entries, but this can be changed by setting the HISTSIZE variable. Command line history keys are mapped to the arrow keys by default. You can navigate the history by pressing arrow up and arrow down keys. Pressing Ctrl + R allows you to search in history; simply start typing your command and bash will display the first match in the history. You can then continue typing to get other results, or press Ctrl + R again to search backwards according to the characters already given. Command completionThe bash shell provides command completion, so typing the first letters from a command and pressing the Tab key will give you the choices from all executables in your path . # cs TAB TAB csh csplit Typing TAB TAB after the executable will show the files in the current directory: lpar5:/etc/sysconfig/network # vi TAB TAB config ifcfg-eth0 ifcfg.template wireless dhcp ifcfg-eth0.ORIG providers if-down.d ifcfg-eth1 routes if-up.d ifcfg-lo scripts The bash configuration filesWhen bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. [1]
In SuSE SLES, the /etc/profile file should not be changed because it can be overwritten by an update. Global shell customization should be done by editing the /etc/profile.local instead. User scripts should be placed in ~/.bashrc in order to make sure it will be used even if a login shell is not started. Alternatives to bashOpen source software offers freedom of choice. If you prefer not to use bash, you can choose other shells , such as the following::
|
< Day Day Up > |