Logging On
To log on you use your MACS username and password. These are the same details
that you'll use in the Windows labs on the ground and first floors. If you have any problems
logging in then report these to EM1.33.
Before you log-in you can choose what type of window manager you'd like to use
from the menu in the top left of the log-in box.
There is a wide range to choose from. Some of them are very light weight (fvwm) others
are more feature heavy and provide more visual chrome to the user.
Most people use either the KDE or GNOME desktops. I'll be using KDE in this tutorial,
but feel free to try them both out and choose which one you prefer.
The Desktop and Launching Applications
Once you log-in you'll see a familiar desktop view, with icons on the desktop that will
either open a folder or launch an application. There is also the Kicker button
in the bottom left corner (or menu buttons in the top left of GNOME). From these
you can browse many of the installed applications on the computer.

Applications can also be executed from the run dialogue that can quickly be
brought up by pressing <ALT>+<F2>, and then entering the name of the
application that you'd like to run. For the next section that will either be the
name or a terminal application. There are many terminal applications to choose
from, but I'd recommend konsole for KDE and terminal for GNOME.
Terminal Basics
The terminal presents you with a command line interface. In here you type commands, press return, and then they are executed. When working with the terminal there are a few basics techniques that can save you a lot of time.
-
The terminal keeps a history of commands that you have issued. You can scroll through these commands
by using the up and down directional keys. This allows you to quickly recall a command that
you recently used.
You can search through your history as well. By hitting <Ctrl>+r you'll activate the reverse
history search. Here you can type part of a previous command, and it will search through your history
to find it.
The "Home" and "End" keys will take you to the beginning and end of the current line.
Text can be pasted into the command line by pressing "Shift+Insert"
<Ctrl>+l will clear the terminal window. Same as issuing the "clear" or "reset" commands
Browsing Files
Files can be browsed graphically by double clicking on the "Home" icon. This will launch a file browser and take you to your home directory. You can also browse the file system from a terminal window as shown below. The commands used here are
-
pwd - Prints the working directory i.e. the folder that you are currently in.
ls - Lists the files within the current directory
cd target - Moves you (changes directory) to the target. cd .. will move you to the parent directory.
mkdir target - Create a new folder with name target
touch target - Create a new file with name target
rm targets - Deletes the files listed in targets. Note: this
will not remove folders.
rm -rf targets - Will delete files recursively (will remove folders and their
contents), and forcefully (will not prompt for confirmation for special files)

Once files and folders have been created they can also be moved and copied.
-
ls target - lists the files inside target
cp sources destination - Will copy sources to the file or folder specified by destination. Use a period "." to indicate that you want to copy to the current directory.
Note: this won't copy folders.
cp -r sources destination - Will copy recursively, so this will copy folders and their contents.
mv source destination - Renames a file or folder. This is read as move.
Editing Files
As we've seen, there are a number of windowing systems and terminal applications
to choose from, so you won't be surprised to hear that there are a number of text
editors to choose from as well. I cover an intro to a number of these here.
This first set of editors are terminal based.
- Vim - a.k.a. vi enhanced, launched by typing vim at the command-line. It is a modal editor, which emphasises never removing your hands from the home keys. For a good tutorial on vim call vimtutor at the command-line. As it is a modal based editor, vim is often accused of have two modes, beep constantly and break everything.
- EMACS - can be executed at the command-line by calling emacs -nx. EMACS uses combinations of Ctrl and Meta keys to perform operations. Once launched, you can access a tutorial by pressing <Ctrl>+h then t. EMACS is feature rich and has built its own programming language (LISP) and a mail program among others. Some say that EMACS suffers from feature bloat, leading to the comment, "EMACS is a great operating system, the only thing it lacks is a decent text editor".
- nano - an evolution of pico. This is the command-line text editor most open to newcomers. Commands are displayed at the bottom of the screen. The caret symbol (^) indicates that the Control key should be held as well.
- gVim - A graphical version of vim
- EMACS - EMACS is usually graphical, it's the -nx flag that makes it run in the terminal.
- nedit - A very simple and portable editor
- gedit - The editor for the GNOME desktop. It can open multiple files in tabs and has a number of other features accessible through the menus.
- kwrite - A light weight version of kate that can only edit one file at a time.
- kate - The advanced editor of the KDE desktop. It's very well featured, and should be the editor of choice for those unwilling to dive into vim or EMACS yet.
Next Steps
You can now have a go at making and moving some files and directories. You should also make sure that you are comfortable using at least one of the text editors, and maybe even have a go at the vim or EMACS tutorials.
If you have any questions, or need any help, just ask one of the instructors.