The main benefit of the Terminal Emulator for SEO is the ability to perform SEO hacking on remote machines by opening shells in the cloud. Furthermore, they have the ability to write or utilize programs that automate work tasks and power websites.
Opening a terminal
If you’re working on a Mac, simply use Spotlight (command-spacebar) to search “terminal” and the top hit should be: terminal.app. Launch it.
How to use Terminal
Now with a terminal window open, let’s orient ourselves.
A dollar sign ($) denotes a shell (bash) command line prompt, which is what you should see in your terminal window.
For the purposes of this article, a single line of text after the dollar sign will denote a command with that text and hitting <enter>.
Sometimes these “single-line” commands can get pretty long and wrap, but we’ll start with very short ones.
The first command we’ll run is going to be about finding where we currently are in the file system. We’re going to ask bash to “Print the Working Directory” with “pwd <enter>” as follows:
~ $ pwd
“/Users/username” is the result of the command, and another prompt appears beneath it.
. Now we’re going to issue the “change directory” (cd <directory name>) command:
~ $ pwd
~ $ cd /random/directory
In case you ever feel lost you can always use cd with the tilde symbol ($ cd ~ <enter>) as a shortcut for returning to your home directory:
/random/directory $ cd ~
As you can see, commands are shortcuts and abbreviations of common tasks.
Here is another example of entering the same command to return to the home directory we entered earlier, but with a comment:
$ cd ~ # let's head back home
Commands to know
There are a handful of commands listed below that should be committed to memory:
$ sudo (super user do)
$ ls (list contents)
$ cd (change directories)
$ touch (makes a blank file)
$ mkdir (makes an empty directory)
$ cp (copy files with options to copy directories)
$ mv (moves or renames files with options for directories)
$ rm (destructively removes files with options for directories)
$ head / tail (prints the first few, or last few lines of a file)
$ cat / tac (prints a file forwards or backwards)
$ grep (globally search a regular expression and print)