linux commands Flashcards
pwd
Print the working directory you are in
cd ..
return to the previous directory
ls
list all files in the working directory
ls –rtl
display detailed information about all files in the working directory and sort by their
modification time in ascending order
ls –l
display detailed information about all files in the working directory
cd
change the working directory to your home directory
mkdir test
short for make directory. used to create directories on a file system
rmdir test
short for make directory. used to create directories on a file system
rmdir test
short for remove directory. used to remove/delete directories on a file system
chmod [newpermission] [filenames]
u : user (yourself)
g: group
o: others (rest of the world)
a: all of the above (u, g and o)
-:remove this permission
+: add this permission
r: read access
w: write access
x: execute access
chmod g-r test
remove read access form group
chmod uog+rwx test
add read, write and excesute access to user, group and others
who
get the information on curreclty logged in users
ps -ef
see processes on the system. pipes the output to “less” to make it scrollable
ps -fu user4
see processes on user 4 system
finger
used to display information about local and remote users (similar to who)
ifconfig -a:
display the status of all interfaces, even those that are down (show IP adress)
kill -9 2168
the kill command is used to terminate processes without having to log out or reboot (restart) the computer. 2168 is the PID of the process
PPID is
the parent process ID of PID
definition od bash
the standard shell for common users (linux)
korn shell
unix shell
ksh
used to change execution method to ksh
exit after ksh
used to exit ksh
scripts
collection of commands that are stored in a file. the shell can read this file and act on the command as if they were typed at the keyboard