echo
output any text we provide
dont need quotes unless text has spaces
whoami
find out what user we’re currently logged in as
ls
listing: shows files and folders in current directory
cd
change directory: moves you into a different folder
cat
concatenate: displays the ontents of a file in the terminal
“show me what’s inside the file”
pwd
print working directory: shows full path of the directory you are currently in
“where am i?”
directory
a folder that organizes files and other folders on a computer.
cd .. {cd space ..]
move one folder up (parent folder)
shell
a program that:
- takes commands you type
- passes them to the OS
- shows you the results
*the middleman between you and the OS
bash
stands for Bourne Again SHell
type of shell. most common shell on linux
find -name [filename]
find a file whose name you know
find -name *.ext
find any file with the extension you list
grep
grep “thing to find” ffile_to_search
allows us to search the contents of files for specific values that we are looking for.
ctrl+c
‘stop whatever you’re waiting for”
- cancels unfinished command
brings you back to normal prompt
&
EXECUTE OCMMANDS IN THE BACKGROUND
&&
This operator allows you to combine multiple commands together in one line of your terminal.
command 2 wll only run if command 1 is successful
>
send this output into a file. if the file exists, erase it first.
echo hello > notes.txt
^^ replaces entire content of notes.txt with ‘hello’
> >
append this output onto the end of a file. do not erase the existing file contents first.
syntax:
command_that_outputs_text»_space; filename
eg
echo “hello world!”»_space; notes.txt
touch
creates a file
SSH
SSH is a protocol that allows us to remotely execute commands on another device remotely.
Any data sent between the devices is encrypted when it is sent over a network such as the Internet
what is an argument and how is it identified?
a hyphen and a certain keyword known as flags or switches
flag
an option you add to a command to change how it behaves
eg ls vs -l[argument]
switch
command that turns something on or off
-a
short for –all
flag that means show everything, including hidden files/folders