Commit these to memory.
pwd # print working directory
ls # list directory contents
mkdir # make directory
cd # change directory
touch
mv # move
cp # copy
rm # remove
man # manual
These are cool but you probably won't need to use them much.
uname
users # show users
uptime
cal # calendar
whoami # who am i
which # where is command (file)
file # view file details
echo
> # newline
>> # write
| # pipe
cat # concatenate files
wc # word count to count text document
info # information
kill # kill program
history # show bash history
grep # globally search a regular expression
date
nano # small text editor
vim / vi
If you get stuck in vim (which you inevitably will) the key is knowing how to exit it.
When you see something like this:
~
~
~
~
filename.txt
Press esc
then :q
. If this doesn't immediately work, a combo of these (maybe esc twice) will usually get you out.
Install homebrew
Install rbenv
Install ruby version 2.5.1
From the command line run ruby -v
. If it displays ruby 2.5.1
you're done 🎉.
We installed pry
as a ruby gem. A gem is like downloading ruby code someone else has written so we can use it for ourselves.
Going forward, make pry
your friend; it's such a useful tool for learning what different ruby methods actually return.