HOWTO setup a small server
BASH (Bourne-again shell)
Configuration of libreadline
There are some ways to make BASH even more comfortable. In order to search
its history with the “page up”/“page down” key, uncomment or add the following
lines in libreadline
's configuration:
Excerpt: /etc/inputrc
"\e[5~": history-search-backward "\e[6~": history-search-forward
Configuration of BASH
Further useful features can be enabled by creating the follwing file (see comments for details)
File: /etc/bash.always
# # this file is sourced (not executed) by /etc/profile # and /etc/bash.bashrc # # history size export HISTSIZE=10000 # do not save commands with leading space in .bash_history export HISTIGNORE=" *" # make cd to some directory in "$CDPATH" work from everywhere # without full path (uncomment to enable) #export CDPATH="~" # correct spelling errors in cd commands shopt -s cdspell # disable hash function (always search $PATH for commands) set +h # colorized ls export LS_OPTIONS='--color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA' # start pico/nano with "-w" option # (to avoid destroyed config files!) alias pico='pico -w' alias nano='nano -w'
and appending the following lines to the BASH configuration:
Excerpt: /etc/bash.bashrc
and /etc/profile
# source /etc/bash.always if [ -f /etc/bash.always ]; then . /etc/bash.always fi