Linux Format

THE COMMAND LINE

-

Start a terminal screen window from your desktop manager. This will show the username and computer name, and will end with an $

character. Enter Nano and use this text editor to practise reading, writing, and modifying files. Now exit Nano via Ctrl+x. Enter su,

followed by the root password. The cursor will then terminate with a #

character. Be very careful! You will now have root access and will be able to modify many of the critical system files. To exit the root terminal enter exit. The cursor will then again terminate with $. Another exit will terminate the terminal screen.

To get root privilege on a live-derived system, enter sudo followed by the command needed, and then the user password.

Before modifying a file, copy it to a backup file with a similar name. We all make mistakes! cp

The commands ls and dir do much the same thing, displaying file names spread out horizontal­ly and with no informatio­n about the files. This can be changed. Open a root terminal screen as described above, then enter:

# nano etc/bash.bashrc

On a live-derived system enter:

$ sudo nano /etc/bash.bashrc

Go to the end of the file and insert the line: alias dir=”ls -l - - color=auto”

(double hyphens before color should be close together). Save the modified file and reboot the PC. Then when you enter dir from a terminal screen, file details will be listed vertically, in colour, and with all of the file attributes.

Newspapers in English

Newspapers from Australia