Environment
Z MyDevil.net
This tutorial is about the environment on our account - the shell. Theoretically, the default environment will be enough for a normal user, but more advanced users may want to play around a little with the shell.
In all these examples, bash shell is used. If we decide to use a different shell, we have to port these command by ourself.
Spis treści |
Locale: encoding
By default, UTF-8 is bing used. But if we wan't to use ISO-8859-2 (PuTTy for example uses this as the default encoding), we have to add this line to ~/.bash_profile:
export LC_ALL="pl_PL.ISO8859-2"
Default editor
The default editor is vi. For some users this might be a difficult one, or just too hard to use. Alternativelly we can use ee, vim, nano, or mcedit. Adding this line to ~/.bash_profile, we can change the default aditor:
export EDITOR="nano"
Coloured 'ls' output.
By default, on MyDevil, the ls utility colours its output using default BSD colors. We can change this to 'GNU' colours, by adding this line to our ~/.bash_profile:
export LSCOLORS="ExGxFxdxCxDxDxhbadExEx"
We can also disable coloured output in ls at all, by adding this line:
unset CLICOLOR
Prompt
The default prompt in our shell looks pretty much like this:
[login@mydevil]:<~>$
If we want to use the default linux one, we can do this very easily:
export PS1="\u@\h:\w\\$ "