1 / 23

Some basic Unix commands

Some basic Unix commands. Understand the concept of loggin into and out of a Unix shell Interact with the system in a basic way through keyboard and terminal window Create, copy and delete files, edit files Understand and use commands like: ls cd mv cp rm cat date mkdir rmdir

flint
Download Presentation

Some basic Unix commands

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Some basic Unix commands • Understand the concept of loggin into and out of a Unix shell • Interact with the system in a basic way through keyboard and terminal window • Create, copy and delete files, edit files • Understand and use commands like: ls cd mv cp rm cat date mkdir rmdir • Be able to navigate up and down in the file system

  2. Logging in and out • As a Unix user you can log in and out • 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 • The shell runs as your process until you log out • The shell gives you a prompt and interprets what you type

  3. Interacting with the system • Default input from the keyboard • Default output to the terminal window • When hitting return the shell interprets what you have typed • The shell finds a command with that name and starts a process to execute the command • During this time the shell process sleeps and wakes up when the command process is done

  4. Working with files • Creating files • Can use vi or any editor • Can use cat with input and output redirection • Copying files • cp makes a copy of an existing file • cat can do it also, we practice this to understand I/O redirection • Deleting files: rm • 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 • ls lists the files in the current directory by name • cd changes your position in the directory tree • mv moves a file from one directory to another • rm deletes a file • date prints the current date and time • mkdir creates a directory • rmdir deletes a directory (must be empty)‏ • All Unix commands have options

  6. Navigating in the directory tree • 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 • A good password • Easily remembered by YOU • Difficult to be guessed by others • Tricks to make a good password • Pick letters from a sentence • I love Unix Ioenx • Pick letters, numbers, and symbols that sound, look like, or replace a phrase • Ihatecarrots! ih8^s! • A bad password not only harms you • Attacks are much easier with a compromised account on a computer

  8. Some Basic Commands • who: Who are using the system. terra$ who katchab ttyp0 Aug 11 08:47 scott tty02 Aug 10 11:01 jenny tty03 Aug 10 07:21 • who am i: Who am I. terra$ who am i katchab ttyp0 Aug 11 08:47

  9. Some Basic Commands • 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/ • cat: Display the content of a file terra$ cat readme Unix is easy! terra$

  10. Some Basic Commands • Ctrl-c: (press <Control> and c at the same time) Interrupt the current task. terra$ cat ^c terra$ • netscape: surf the net. ONLY WHEN X is running terra$ netscape • lynx: surf the net. terra$ lynx www.yahoo.com

  11. Some Basic Commands • 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 • File Manipulation Commands: • copy (cp), rename (mv), print (lpr), examine a file (head, more, cat), search a file (grep), delete (rm) • Miscellaneous commands • echo, date, cat • Basic File Compression – gzip, gunzip • Finding Utilities and help • which, whereis, apropos, man, info • Communicating online • Chat (write/talk) and email (pine)

  13. Communication Utilities in UNIX

  14. The talk Command

  15. A Complete talk Session

  16. A Complete talk Session

  17. A Complete talk Session

  18. The write Command

  19. E-Mail Programs • 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

  20. Email Address

  21. PINE • A menu-driven client • Uses pico as an editor • Allows MIME attachments • Main Menu • C - Compose to write a message • I or L - View messages • Q - Quit

  22. Local login

  23. Remote Login

More Related