Important note

These pages are deprecated (latest changes date from end 2001). More recent information may be found at I leave the old pages here as they are because lots of people are still visiting them (eventhough they aren't spell-checked), and because the basics are still useful.

Access to the Unix system, to files and directories

In this chapter we will learn how to connect to and disconnect from a Unix system. We will discuss navigating through the filesystem and locating files within the system. We will find out about first level Unix security changing our password and using access modes on files. We will discuss some popular ways of viewing files and introduce the graphical user interface system, X.

Getting started

What do you need?

In order to be able to log on to a Unix system, you need to get a login, a and a password, your loginname and related userid need to be assigned to one or more groups, you need a homedirectory and, in order to do anything directly on the system, a shell.

On most sites, there will be more than one Unix server to connect to, so you may also want to know the hostname of your system.

Connecting to a system

Logging on to a Unix server can be done in a number of ways:

  • locally on the console, in text mode (some systems offer virtual consoles)

  • locally in graphical mode, using X

  • using remote display of X

  • from another Unix host, using telnet or ssh (Secure SHell)

  • from an MS Windows, Mac or other PC system using a terminal emulation program such as the MS Windows telnet program, CRT, F-secure, MacTelnet (former NCSA Telnet), putty, ...

Whatever method you use, you always have to authenticate to the system. Some form of a login prompt will be displayed, enter your username here (you got it from your system administrator, it may be called loginname, userID, username or login). After that, the system will ask your password.

When you log in using some form of textmode, the system will display a "message of the day" or motd, most of the time some information on the system you're connecting to, such as the operating system version, kernel information, vendor etc. Sometimes it will display a fortune cookie to get you in the mood. After that you will be given a shell prompt, see next chapter on shells.

When using graphical mode, the system will start an X session for you. In order to manipulate a system or environment in graphical mode, you will then likely want to open an X terminal window or xterm which starts your default shell in a window. There may be shortcuts for opening an xterm, or you may have to use the mouse buttons. Since you are already authenticated to the system, you don't need to log in again.

Changing your password

User account, including passwords, are the first line of defense. Creating and maintaining user accounts is one of the tasks of a system administrator. On a system that is monitored on a daily basis, some programs should be installed to usher users to change their passwords regularly and to make them acceptably difficult. In this case you will have to use the passwd command every now and then. Should the system not point you in that direction, take a look at the chapter about scheduling commands to install your own reminders.

Changing your password should be the first thing you do when accessing a new account for the first time. Just type passwd on the command line and follow the instructions. You will be asked to enter your current password, and after acception the system asks you to enter the new password twice. You'll get a message saying that your entry in the /etc/passwd file and some other related files are updated.


The passwd is only used to change a local password (when the system that you log on to does the authentication). On larger sites, there may be one or more central authentication servers requiring a different method to change your password. You may have to use the yppasswd command or use a webinterface. Look for your username in /etc/passwd, if it isn't there, don't use the passwd command. Ask your system administrator for advice.

Disconnecting from a system

Text mode

When you're done working on the system, you should always log out. Don't just switch out the screen, but enter the exit or logout command. In most shells entering CTRL-D does the same. Do this in all open shells (or xterms), including those on other virtual consoles if you have them.

The system will then display a new login prompt, or distroy the terminal window if that's what you were using.

When connecting from a PC, the terminal emulation program will show a blank window and a disconnect message in most cases.

Graphical mode

After closing all terminal windows and applications, find the logout button. Most desktop systems have one, if you use just a window manager try the mouse buttons to display menus.