Reference: Command Line Interface (CLI)

Challenge: quick reference for useful CLI commands. (Note: in creation of this post, many of these commands became ingrained, and as a result, used more frequently. Learning!)

look at CLI history

mv old_directory_name new_directory_name

look at CLI history


and run one of the cmds


view file sizes

ls -sh

jump word navigate

esc + f, esc + b

ctrl + [, release, b or f

discover internet

sudo ifconfig

view logs

tail [options] [filename]

tail --lines=1000 file.ext

tail -f thin.log

view Heroku logs

Heroku logs --tail

test URL accessibility

ping URL


multiple terminals


search package manager brew

brew search app_name_string

view/edit bash profile

open ~/.bash_profile

editing configs

nano ~/.gitconfig

nano ~/.bash_profile

reload after edit

source ~/.gitconfig

exec bash

show current pathway (print working directory)


jump to home directory


create new file

touch file_name

rename file

mv old_name new_name

delete file

rm file

delete directory with files

rm -rf directory

copy / secure copy

cp /tmp/file_name .

scp file_name server.location:/tmp


iTerm2 Shortcuts

split screen vertically (two panes)

cmd + d