The Basics of the Command Line
A couple of weeks ago I did a quick stream (ok it wasn’t quick, it was almost 90 minutes) on the Basics of the Command Line.
My goal was to start at the beginning, with navigating around files and folders and editing text, while picking up some tips and tricks along the way, as well show why the command line is still so useful and important. I spend a lot of time trying to drive home that you should definitely definitely use the tab key to autocomplete paths as it will make your life easier. I also get into some automation stuff, like using |
and >
to chain commands together.
In order to make the video a little more useful for folks how don’t want to watch the whole thing, I also broke the video up in to chapters. You can find them below as well as in the description below the actual video:
- 2:52 - Bash and ZSH
- 3:51 - If you are using Windows
- 5:56 - Why Command Line?
- 10:32 - First launch of the terminal
- 11:31 - File paths / directories
- 12:46 -
pwd
(print working directory) - 13:15 -
ls
(list directory contents) - 14:26 - Command line arguments
- 17:17 -
cd
(change directory) - 18:46 - Find the size of files with
ls -lah
- 19:54 - Navigating up a directory or to absolute paths with
cd
- 24:46 -
man
(general commands manual) - 29:05 - Tab completion
- 34:57 -
cp
(copy files and directories) - 38:43 - Up arrow to scroll back through commands
- 40:06 -
rm
(delete files and directories) - 41:22 -
mv
(move files and directories) - 41:40 -
mkdir
(make directory) - 42:10 - How to handle files and directories with spaces in the name
- 50:01 - Web searches for man pages
- 52:06 - Editing text from the command line
- 55:21 -
nano
(text editor) - 1:01:12 -
vim
(another text editor) - 1:04:58 -
sudo
(”super user do” run a command with root privileges) - 1:09:59 -
!!
(”bang bang” repeat last command) - 1:12:05 -
history
(see your history of commands executed) - 1:14:21 -
grep
(search for text in a file) - 1:15:36 -
|
(pipe) - 1:18:00 -
>
and>>
(redirecting output)
Comments