Commands

A collection of useful Linux commands and how to use them.

The Usual Suspects

man - what does the ____ command do?

The man command allows the user to view the manual of any command that has one. Try it out with man man, you'll see a list of uppercase informative sections including NAME DESCRIPTION and OPTIONS.

cd - how do i get around?

The change directory command lets you move between directories.

ls - show me everything in this directory

pwd - where am i?

mv - let's move this file

rm - i would like to destroy this file or directory

alias - i want to make my own cool linux commands

The IO Stuff

cat - print all the things!

less - i want to look at a file in my terminal without using a text editor

head - only show me the top part

tail - only show me the bottom part

Prints out the last 10 lines of the input by default.

  • -n specify the number of lines to output

  • -f prevents tail from closing and waits for additional output; useful for printing out a file as it is appended to

The Super Powerful Ones That Don't Make Sense

sed - i want to edit a stream of text

Last updated