<<

Logging In

• Since is a multi-user , if you want to use it, you must first identify yourself to the UNIX system. You do this by logging in. Getting Started

Logging In Logging In

• The server we will be using for most • You can currently use: of this class is accessible through ssh the network by the name of to connect to the servers, after which you will be prompted for a ella.slis.indiana.edu username and password. The • This is the fully qualified hostname secure shell (ssh) has replaced for ella and includes the name of telnet as a secure means to the UNIX host (ella) and the domain connect to your host. name. More on this later.

Logging In Practice Logging In Practice

• We will use ssh to connect to our host, ella. • Alternately, you can open the terminal application in "Utilities" and : • Locate your terminal icon in the dock ( the bottom of your screen). $ ssh ella.slis.indiana.edu

• Right-click the icon and choose "ella"

1 kerberos authentication Logging In

• You will be asked for your kerberos • Once successfully logged in, a UNIX password, which should be the same system typically tells you when you password you used to log in at this lab. logged in last and from where, gives • Kerberos is a secure way to authenticate you some arbitrary text written by the across an insecure network. You and the system administrator, provides you computer you connect to prove that you with a command shell prompt, and are you say you are without actually then waits for your commands. sending passwords across the network.

Logging In Logging In

• Example: • A command prompt generally ends Last login: Tue Sep 10 12:45:29 2002 from chionofuji.slis |------| with either a dollar sign ( ) or a | This system is for the use of authorized users only. | $ | Individuals using this computer system without authority, or in | | excess of their authority, are subject to having all of their | percent sign (%). There are two main | activities on this system monitored and recorded by system | | personnel. | types of command shells; those | | | In the course of monitoring individuals improperly using this | | system, or in the course of system maintenance, the activities | based on a Bourne shell (i.e. sh and | of authorized users may also be monitored. | | | bash) and those based on a shell | Anyone using this system expressly consents to such monitoring | | and is advised that if such monitoring reveals possible | | evidence of criminal activity, system personnel may provide the | (i.e. csh and tcsh). | evidence of such monitoring to law enforcement officials. | |------|

You have mail. $

Logging In Getting your Practice Directory

• To keep you straight on which you • During this module you will be using are using, the two shells traditionally a practice directory structure use different prompts: complete with practice files and • $ for Bourne shells directories. • % for C shells. • You will now install this into your • Your account on ella uses a Bourne home directory on ella. shell (bash to be specific). More on this later.

2 Getting your Practice Directory UNIX Commands

sure you are logged into ella • Now you are in the system, but you and type these commands: have to know how to to the $ (press return) system. $ tar -xvf /tmp/UNIX_class.tar • There are a number of commands • You will see a list of filenames and which you need to know in order to directories scroll by. You will learn tell the system to do various things more about the command you just (show you directories, move files, used on your last day of this module. copy files, search through files, etc.).

UNIX Commands UNIX Commands

• UNIX Commands generally have three • UNIX Commands generally have three parts: parts: command_name command_name [options]

• Example: • Example: $ $ ls -l Tells the system to make a list of files List files, in “long format” form (gives more information about the files)

UNIX Commands UNIX Commands

• UNIX Commands generally have three • UNIX Commands generally have three parts: parts: command_name [options] command_name [options][operands]

• Note: In some texts and web links, • Example: options can also be referred to as $ ls -l UNIX_class “flags”. List files, in “long format” form, in the directory called ‘UNIX_class’

3 UNIX Commands UNIX Commands

• UNIX Commands generally have three • Not all commands will need all three parts: parts. In fact, some will only need command_name [options][operands] the command_name. However, others may require two [operands] • Note: In some texts and web links, operands can also be referred to as “arguments”

UNIX Commands UNIX Commands

• After you give your command and • Remember: press return, the ‘answer’ or ‘results’ • UNIX is case-sensitive; old.files the system gives you is called the is different from Old.Files output. When the system outputs to your screen, it is called the • The spaces between the standard output (stdout). More on command_name, the [option] and this later. the [operand] are VERY important

who - Practice who - Practice

• One simple UNIX command is used • Example Output to out who is currently logged in.

At the shell prompt (the $), type who. $ who herring pts/12 Jun 17 15:36 (herring.slis.indiana.edu) mnapier pts/4 Jun 14 21:29 (12-222-70-96.client.insightbb.com) mnapier pts/8 Jun 17 07:39 (dmitrii.slis.indiana.edu) $ who jfieber pts/5 Jun 17 15:56 (d-1-1.dhcp-149-159.indiana.edu) htripath pts/3 Jun 17 11:10 (lair4.slis.indiana.edu) mnapier pts/9 Jun 16 09:00 (12-222-70-96.client.insightbb.com) stevecox pts/10 Jun 17 16:51 (wireless-73-28.wireless.indiana.edu) stevecox pts/13 Jun 17 16:34 (chionofuji.slis.indiana.edu) $

4 Directories

• The information stored in the UNIX system is hierarchical.

• Like the “folders” on a Mac or UNIX Directories Windows operating system, UNIX works with “directories.”

Directories Directories

• A directory can contain either files or more directories (often called subdirectories). • There are a number of common UNIX directories found on most systems (see page 21).

Directories Directories

• The ‘home’ directory is your personal • All files and directories on the system reside under subdirectory under /home. It is where you the root directory, the [ / ]. Where other directories have real names, the name of the directory at the will store all of your personal data. very top of the UNIX O/S is the forward slash (/). •Example: /home/jsmith

5 Directories Logging Out

• When you are finished, always remember to type logout

• On some systems you • The ‘working’ or ‘current’ directory is can type whatever directory you are in at the moment. or quit or Ctrl+D as well.

The End…

• Next…

• Basic Commands

6