Linux commands Flashcards
What command is used to number lines in terminal output?
nl (number lines)
What command lets you rename files?
mv (move)
What command lets you delete files?
rm (remove)
What command lets you view file/directory permissions?
ls -l or ll
What character lets you run multiple commands on one line?
; semicolon
How do you feed the output of one command as the input of another?
use the pipe | symbol.
What command is used to search through directories?
find
How to search through all directories recursively?
find / -name. This starts at root.
what command lets you change passwords?
passwd {user}
What command lets you organize the terminal output?
sort
What characters let you funnel a commands output into a recording file?
> ,»_space;, 2>, 2», &>, &»
What is the command for finding regular expressions?
grep
What are some useful options for grep and what do they do?
-i : ignores case
-v : outputs lines without the regex.
-n : numbers the lines
-l
-o : print only the matching part of a line
-r : searches directories recursively.
top
ps
Lists all processes currently running.
What are some of the options for ps and what do they do?
c:
A:
l:
…
What are some of the network utilities in Linux?
ifconfig
route
ping
traceroute
dig
netstat
ssh
dig
displays results from DNS serversn
netstat
display network statistics …
ssh
allows a user to login to a remote machine.
traceroute
Displays the routed network path between a client and its destination
ifconfig
Display interface config information
ping
change
Used to change password aging settings for a user
date
displays current date and time
cal/ncal
displays the current calendar with numerous options.w
who
Gives information about users. Related commands are whoami and who am I.
what are the permissions symbols?
r: read
w: write
x: execute
What methods can be used to change permissions?
The command to change permissions is chmod. You can change it using permissions symbols by using the desired viewer’s symbol (u, g, o, a), an operator, then the permissions symbols you want to add or remove (ex. go+rw). It can also be done numerically with numbers 1-7. Think of rwx as binary, with x in the 1 space, w in 2, and r in 4.