Presentation on theme: "1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and."— Presentation transcript:
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and terminal window u Create, copy and delete files, edit files u Understand and use commands like: ls cd mv cp rm cat date mkdir rmdir u Be able to navigate up and down in the file system
2 Logging in and out u As a Unix user you can log in and out u When loggin in, the system checks your user name and password – if correct, the system starts a shell for you and places you in the starting directory u The shell runs as your process until you log out u The shell gives you a prompt and interprets what you type
3 Interacting with the system u Default input from the keyboard u Default output to the terminal window When hitting return the shell interprets what you have typed u The shell finds a command with that name and starts a process to execute the command u During this time the shell process sleeps and wakes up when the command process is done
4 Working with files u Creating files –Can use vi or any editor –Can use cat with input and output redirection u Copying files –cp makes a copy of an existing file –cat can do it also, we practice this to understand I/O redirection u Deleting files: rm u Editing files we will learn about vi, the most available Unix editor other editors are available on the system as applications
5 More important commands u ls lists the files in the current directory by name u cd changes your position in the directory tree u mv moves a file from one directory to another u rm deletes a file u date prints the current date and time u mkdir creates a directory u rmdir deletes a directory (must be empty) u All Unix commands have options
6 Navigating in the directory tree u The cd command changes your position in the directory tree, destination is parameter, it must be the name of a directory visible in the current directory –cd without parameter –Relative movement (relative pathname) –Absolute movement (absolute pathname) –cd.. and cd.
7 To Make a Good Password u A good password –Easily remembered by YOU –Difficult to be guessed by others u Tricks to make a good password –Pick letters from a sentence v I love Unix Ioenx –Pick letters, numbers, and symbols that sound, look like, or replace a phrase v I hate carrots! ih8^s! u A bad password not only harms you –Attacks are much easier with a compromised account on a computer
8 Some Basic Commands u who: Who are using the system. terra$ who katchabttyp0Aug 11 08:47 scotttty02Aug 10 11:01 jennytty03Aug 10 07:21 terra$ who am i katchabttyp0Aug 11 08:47 u who am i: Who am I.
9 Some Basic Commands u ls: List the files under current directory terra$ ls readme cs211.2.ppt cs211.ppt.gz notes.zip cs211.1.ppt cs211.3.ppt make/ shell/ terra$ cat readme Unix is easy! terra$ u cat: Display the content of a file
10 Some Basic Commands u Ctrl-c: (press and c at the same time) Interrupt the current task. terra$ cat ^c terra$ u lynx: surf the net. terra$ netscape u netscape: surf the net. ONLY WHEN X is running terra$ lynx www.yahoo.com
11 Some Basic Commands u man: See the manual page of a command. terra$ man cat Reformatting page. Wait... Done User Commands cat(1) NAME cat - concatenate and display files SYNOPSIS cat [ -nbsuvet ] [ file... ] DESCRIPTION cat reads each file in sequence and writes it on the stan- dard output. Thus: example% cat file prints file on your terminal, and: example% cat file1 file2 >file3 concatenates file1 and file2, and writes the results in file3. If no input file is given, cat reads from the stan- dard input file. OPTIONS--More--(11%)
12 Commands covered today u File Manipulation Commands: –copy (cp), rename (mv), print (lpr), examine a file (head, more, cat), search a file (grep), delete (rm) u Miscellaneous commands –echo, date, cat u Basic File Compression – gzip, gunzip u Finding Utilities and help –which, whereis, apropos, man, info u Communicating online –Chat (write/talk) and email (pine)
19 E-Mail Programs u Some Programs available in Unix/Linux –Mail – most basic, low level mail command –ELM –PINE (PINE Is Not Elm), more user friendly text mail –Outlook, GUI driven –Eudora –Netscape Mailer