Introduction
There are a number of different text editors in the environment.
Terminal mode
From the command line you can use vim
, nano
or emacs
(in non-window mode). All of them are very powerful but there is a bit of a learning curve. The man pages, “cheat cheats” and youtube videos can be used to find more details, in particular on commands and keyboard shortcuts.
Graphical mode
In windows mode you can use the terminal mode editors or you can use editors that have a GUI. Besides emacs in its (default) window mode, other more “notepad-like” editors like gedit
are also available on SCIAMA. You can invoke these editors from the command line e.g.
Exercise
Linux applications often use (hidden) dot files. These are files located in your $HOME that start with a dot, eg: .bashrc
. These are sometimes referred to as startup files which contain information used by a particular application when its starts.
Use an editor of your choice to edit the file $HOME/.bashrc
.
Add the following line:-
PS1="(Training)[\u@\h\[\e[1;34m\](sciama)\[\e[0m\] \W]\$"
once added execute the following:-
ls
Do you see a difference in your prompt ?
NB: The cd
command by itself returns you to $HOME
(i.e. home directory) .