Command: wget (Download Web Content)

wget is a very common command used daily to download resources from the web. You will utilize this command a lot, so get used to it and become comfortable. wget can help you download content from sites to set up applications on your server, download new content from 3rd party sources, and more. See examples below.


The above example shows how tux uses the 'wget' command to access wordpress.org, and download their latest version to then house on the current working direcotry that tux is in.


The above example shows how tux changes his directory to move in back in to the directory he was just in. This can be a time saver when trying to move around quickly.


Command: ftp (File Transfer Protocol)

mkdir is a great command to use when you are needing to create a new directory. Here is an example below on using the mkdir command:


The above example shows how tux creates a directory called 'exampledir'. Keep in mind, that this creates this directory in the working directory that tux is in.


Command: sftp (Secure Transfer Protocol)

rm is a very powerful command to remove files or directories. Included is also some good tips to decrease mistakes made when using this command. Here are examples below on using the rm command:


The above example shows how tux deletes a directory called 'exampledir'. This command will delete everything within the 'exampledir' directory. This will also prompt tux if he is sure he wants to delete each file within that directory. That might not be very productive in the long run, so see the example below to skip over each request to delete.



The above example shows how tux deletes a directory called 'exampledir'. This command will delete everything within the 'exampledir' directory. This execution differs from the above example, because this will delete everything in this directory without asking for permission first. Be very careful with this command. It is always recommended to type out the full file path first, then add 'rm -rf' in front last, to make sure you do not delete something by accident.


Command: rsync (Move/Rename a file or directory)

mv is an interesting command, because it is mainly used to rename a file or directory. That could also be considered moving the files/directories too. Included is an example of how to use the command. Here are examples below on using the rm command:


This example shown above takes the file 'oldname.txt' and renames it it 'newname.txt' The funny thing is, is that it technically moves the file, hence the command 'mv for move' but really, it is being moved to the same exact directory, just a different name. So you can use this command to both move and rename.


Command: scp (Copy Files or Directories)

cp is a very useful command that will be used often in day to day activities. It is best to use this command if you do not have very larges files or directories to move, are typically working inside one environment, or just need a fast go to command to transfer files from one place to another. Below are a few examples of the cp command.



The example shown above takes the file 'mysite.html' and copies it in to an html file called 'mysite2.html' in your current working directory. This is a basic example of this command. Adding different options after 'cp' can accomplish different things.


Command: curl (Create a blank file)

touch is a pretty basic command. It is good to know if you want to create a blank file, but it does not do much more than that. This command will most likely not be used the often, but is still useful to know. Below is an example:


The example above shows how tux creates a blank files called 'file.txt'. Nothing will be inside this file; just blank.


Command: ls (List all files and directories)

ls is a very useful and great command that will be used almost everytime that you work via SSH. This command allows the user to list the files and directories of the current working directory. There are additional options that can be added to ls to show more specific details about what you are viewing as well. Below are examples.


Just simply typing 'ls' via SSH will give a view of all files and directories, in the working directory you are currently in.


This example shown above takes the file 'oldname.txt' and renames it it 'newname.txt' The funny thing is, is that it technically moves the file, hence the command 'mv for move' but really, it is being moved to the same exact directory, just a different name. So you can use this command to both move and rename.