
230 You Are Here
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
It’s a pretty short file. Those hash marks (#) are comments. Any text after them is ignored by the
shell, but they are put there to help guide anyone who’s editing or modifying files.
Bring your cursor under the line #User specific aliases and functions and type:
alias ls="ls -al --color"
So the full file ought to look something like this:
# .bashrc
# User specific aliases and functions
alias ls="ls -al --color"
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
See Figure 16.8 for an example in Pico.
Double-check for any typos then, when you’re satisfied with the changes, exit by pressing the
Ctrl
and
X keys. You’ll see, at the bottom of your editor screen, a message reading:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES)?
Press
Y for “yes.” Now, another message will appear at the bottom:
File Name to write: .bashrc
Comentarios a estos manuales