welcome to unix. redistribution the authors (nor anyone else) provides no warranty or claim of...
TRANSCRIPT
![Page 1: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/1.jpg)
Welcome to Unix
![Page 2: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/2.jpg)
Redistribution
• The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk.
• You may use this document in whole or part according to the terms of the GPL. See http://www.gnu.org/copyleft/gpl.html for details.
![Page 3: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/3.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 4: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/4.jpg)
What is it and where do you get it?
• An operating system used on everything from servers to embedded systems.
• Most of the Network users first login to Unix machine before they really access to routers and switches
![Page 5: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/5.jpg)
Where do you get Help
~>man command
• gives you help on that command.
• tells you all man pages that contain keyword.
• Of course .. Google or Wiki
![Page 6: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/6.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 7: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/7.jpg)
Files and Directories:Naming something gives you power over it.
![Page 8: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/8.jpg)
Absolute Addressing
![Page 9: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/9.jpg)
Addressing relative to your home dir.
![Page 10: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/10.jpg)
Addressing relative to your current dir.
![Page 11: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/11.jpg)
File system commands
• pwd - report your current directory
• cd <to where> - change your current directory
• ls <directory> -list contents of directory
• cp <old file> <new file> - copy
• mv <old file> <new file> - move (or rename)
• rm <file> -delete a file
• mkdir <new directory name> -make a directory
• rmdir <directory> -remove an empty directory
![Page 12: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/12.jpg)
getting recursive
• remove a directory and its contents:
rm -r <directory>
• copy a directory and its contents:
cp -r <directory>
![Page 13: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/13.jpg)
File permissions.
• There are 3 kinds of people in the world: you (user), your friends (group) and everyone else (other).
• Each sort of person may or may not be able to read, write, or execute a file.
>ls -l .forward-rw-r--r-- 1 darin csua 23 Jan 23 2002 .forwardChown
>ls -l .cshrc.local-rwxr-xr-- 1 darin csua 2988 May 19 00:48 .cshrc.local*
![Page 14: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/14.jpg)
executing
• “executing” a file means running it as a program.
• “executing” a directory means setting your current directory to it using cd.
![Page 15: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/15.jpg)
Changing File Permissions
• make a file readable to your friends:
chmod g+r <filename>
• change who owns a file:
chown <user> <filename>
• change to which group the file belongs:
chgrp <group> <filename>
![Page 16: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/16.jpg)
touch
• look at the full listing again:
>ls -l .forward-rw-r--r-- 1 darin csua 23 Jan 23 2002 .forward
• Each file has a date stamp of when it was modified.
• Use touch to set the timestamp to the current clock.
touch <filename>
• Touch creates the file if it didn’t exist beforehand.
• You can only touch a file to which you can write.
![Page 17: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/17.jpg)
Symbolic Links
• use ln -s <old file> <second name> to create a symbolic link to a file.
>ls -l .forward*-rw-r--r-- 1 darin csua .forwarddrwxr-xr-x 1 darin csua .forward.link@ -> .forward
• The first “l” tells you that it’s a symbolic link.
• Symbolic links can be used as if it were its target.
![Page 18: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/18.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 19: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/19.jpg)
what’s a shell?
• The shell is the program that
runs when you log in. It prints
the prompt and reads what you
type, invokes programs, etc.
• your window to the Unix world.
• use “chsh <new shell>” to change your shell
![Page 20: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/20.jpg)
File Globbing
• some commands can work on many files at once:
~> rm file1 file2 file27
• Use * to match any number of unknown characters
~> rm file*
• Use ? to match one unknown character.
~> rm file??
![Page 21: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/21.jpg)
(un)aliasing
• create shortcuts for yourself
~>alias ll “ls -la”
Use alias with no arguments to discover current aliases
~>alias
rm rm -i
ll ls -la
• Type “unalias rm” to remove alias.
![Page 22: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/22.jpg)
shell variables, echo
(tcsh) ~>setenv BOB “joe”
(tcsh) ~>printenv BOB
joe
(tcsh) ~>echo $BOB
joe
![Page 23: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/23.jpg)
PATH: a very important shell variable
>echo $PATH/home/d/da/darin/bin:/opt/local/bin:/opt/local/bin/
pbmutils:/usr/bin:/usr/sbin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/local/X11/bin:/usr/dt/bin:/usr/openwin/bin:/opt/local/gnu/bin:/opt/local/games/bin:/usr/ucb:./
• If a program (like ls) is in one directory found in your path, then typing it (~>ls <enter>) will execute it.
• Otherwise you can type the full absolute address to execute a program (~>/usr/bin/ls <enter>)
![Page 24: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/24.jpg)
finding things in your PATH.
• Type “which <command>” to find the location of the program which would be run when you type <command>.
• If you don’t remember if it was chgrp or chgroup, type “ch<control-d>” to get a list of commands that starts with ch.
• when all else fails, use “find” to find a file.
~>find <start dir> -name “*.doc”
![Page 25: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/25.jpg)
Other useful pre-defined shell variables
• HOST what computer you’re logged into
• PAGER program used display man pages
• PWD current directory
• GROUP what group you’re in
• USER your login
![Page 26: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/26.jpg)
Shell scripts.
• If you have a bunch of commands you’d like to automate, you can put them on separate lines of a file. Then type “source <file>” to run the script.
• If the first line of your script looks like
#!<program name>then you can make the script executable. When it
executes, it uses <program name> to interpret the contents of the script.
![Page 27: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/27.jpg)
Login scripts
• Most people have a script that executes when they log in. It is commonly used to set up one’s PATH and aliases.
• Ask someone to help you start your own login script.
![Page 28: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/28.jpg)
screen is your friend
• You can use the program “screen” to run several shells from one window.
• create a new shell by pressing <ctrl-a> c
• switch shells by pressing <ctrl-a> <number>
• use “<ctrl-a> d” to detach a session and come back to it later.
![Page 29: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/29.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 30: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/30.jpg)
Your Options
• Abstinence
(switch majors, unplug your computer)
• monogamy
(use only one computer, do not use network)
• protection
(also known as encryption)
![Page 31: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/31.jpg)
What not to use.
• telnet, ftp, rlogin
• all your data (including your password) is transmitted plain text over the network.
• from library machines you can use the java ssh client from a web browser.
![Page 32: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/32.jpg)
using ssh keys
• use “ssh-keygen” to generate a public/private set of keys. You keep the private key and append the public key to authorized_keys.
• You can now log in using either your password or the private key file.
![Page 33: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/33.jpg)
using secure copy: scp
• copy local to remotescp <source file> user@machine:<path>
• copy remote to localscp user@machine:<path> <source file>
![Page 34: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/34.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 35: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/35.jpg)
the program mail
• “mail”: useful for sending:
>mail darin@csuaSubject: helloCc:hi therethis is a message.
![Page 36: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/36.jpg)
other console based options
• elm - quick and simple, easy to use, but doesn’t handle attachments very well.
• pine - more complete. the “standard”
• mutt - most modern/complex.
![Page 37: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/37.jpg)
accessing mail remotely• netscape, outlook, eudora, and others can get at your mail
using POP or IMAP.
• POP takes the messages off the server to your local computer.
• IMAP only reads headers, but leaves mail how it is on the server. Works well if you wish to use console based email.
• ALWAYS use SSL (encryption).
![Page 38: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/38.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 39: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/39.jpg)
vi
• is an editor available on all decent Unix systems. Developed at Berkeley.
• Has two modes: command and insert. In insert mode you can type normally.
• Press escape to get into command mode. In command mode each letter is a command.
hjkl
![Page 40: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/40.jpg)
pico - the pine composer
• the simplest visual editor available on most Unix systems.
• all possible commands displayed at bottom of screen. (control-somethings)
• no real surprises
![Page 41: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/41.jpg)
Outline
I. getting helpII. the file systemIII. the shell
V. email optionsVI. and lesser editorsVII. input and output redirectionVIII.printingIX. process managementX. X
![Page 42: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/42.jpg)
STD*
• All terminal programs have:
– standard output, which is usually your screen– standard input, which is usually your keyboard– standard error, which is also the screen
![Page 43: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/43.jpg)
redirect output to a file with >
• If you type who at the prompt, you will get a list of who is logged into the system.
• If you type who >f, a file named f will be created and the standard output of who will be placed in that file instead of to your screen.
![Page 44: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/44.jpg)
> vers >>
• By default, who >f will overwrite the file f.
• Use who >>f to append to f rather than overwriting it.
![Page 45: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/45.jpg)
redirecting input from a file with <
• The program sort will sort its standard input and then print it on standard out.
• To sort the lines of file1 and display:
sort < file1
• To sort the lines of file1 and save in file2:
sort < file1 > file2
![Page 46: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/46.jpg)
The output of one program can be the input to another.
who | sort >file1
• The output of who is sorted and shown on your terminal screen.
![Page 47: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/47.jpg)
grep
• grep shows only those lines containing its search pattern.
• To see all lines in a file containing ‘bob’:
grep ‘Dropped Packet’ < file1 >file2
![Page 48: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/48.jpg)
The cat command
• the arguments to cat are concatenated together and displayed on stdout. To view a file:
cat file1
• if no arguments, cat puts on stdout whatever you type on stdin, so this does the same thing:
cat < file1
![Page 49: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/49.jpg)
Outline
I. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirectionVIII. process managementIX.Other Useful commands
![Page 50: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/50.jpg)
how to print a .ps file
• syntax:
lp -D<printer> <filename>
• example:
lp -Dlw330 myfile.ps
![Page 51: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/51.jpg)
How to check the printer’s queue.
• syntax:
lpq -P<printer_name>
• example:
lpq -Plw330
![Page 52: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/52.jpg)
OutlineI. getting helpII. the file systemIII. the shellV. email optionsVI. and lesser editorsVII. input and output redirection
VIII.printingIX. process managementX. X
![Page 53: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/53.jpg)
To start a process in the background, use “&”.
• example:
big_program > output &
• big_program will not have input!
![Page 54: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/54.jpg)
managing jobs
• To suspend the currently active program, use <control-z>.
• To return to the program you just suspended, type “fg”
• To put the program you just suspended in the background, type “bg”
![Page 55: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/55.jpg)
To see a list of your programs running, type “ps”.
>ps -eaf PID TTY TIME CMD 866 pts/1 00:00:00 tcsh 872 pts/1 00:00:00 ps
![Page 56: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/56.jpg)
use kill to end a process
>ps PID TTY TIME CMD 866 pts/1 00:00:00 tcsh 874 pts/1 00:00:00 cat 875 pts/1 00:00:00 ps
>kill 874[1] Terminated cat
![Page 57: Welcome to Unix. Redistribution The authors (nor anyone else) provides no warranty or claim of accuracy of this document. Use at your own risk. You may](https://reader033.vdocument.in/reader033/viewer/2022061304/5513d94155034646298b54fb/html5/thumbnails/57.jpg)
kill -9
• If kill <PID> doesn’t end your process, use kill -9 <PID>