emacs
editor was originally written by Richard Stallman. It is a gigantic, all-purpose, does-everything programming environment. Though readily available, it is seldom installed on most Linux systems by default. lists the meanings of our additions.export HISTCONTROL=ignoredups
Causes the shell’s history recording feature to ignore a command if the same command was just recorded.
export HISTSIZE=1000
Increases the size of the command history from the default of 500 lines to 1000 lines.
alias l.='ls -d .* --color=auto'
Creates a new command called l.
, which displays all directory entries that begin with a dot.
alias ll='ls -l –color=auto'
Creates a new command called ll
, which displays a long-format directory listing.
As we can see, many of our additions are not intuitively obvious, so it would be a good idea to add some comments to our .bashrc file to help explain things to the humans. Using the editor, change our additions to look like this:
# Change umask to make directory sharing easier
umask 0002# Ignore duplicates in command history and increase
# history size to 1000 lines
export HISTCONTROL=ignoredups export HISTSIZE=1000# Add some helpful aliases
alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto'
Ah, much better! With our changes complete, press ctrl-O to save our modified .bashrc file and ctrl-X to exit nano
.