Basic Linux Terminal Commands
If you are new to Linux and it’s terminal, you might be wondering how to move around? I’ll show you how with some basic terminal commands.

Below I’ll list a few examples with comments denoted by //
ls
//Changes Directory
cd FOLDERNAME
//Go up one directory
cd ..
//Go to your home
cd
//Make directory
mkdir FOLDERNAME
//Remove a file
rm — FILENAME
//Copy a file
cp ORIGINALFILE NEWFILE
//Move a file
mv SOURCE DESTINATION
//Install Program
sudo apt-get install PROGRAMNAME
//To run a program you usually specify the name, if text editor, its usually name of program and text file to create, if no file is specified, the text editor still opens.
firefox
emacs hello_world.cpp
//Compile a program using g++
g++ hello_world.cpp
//Execute program
./PROGRAMNAME
./a.out
An example of finding help for a certain command is the following:
By asking for help, you’ll receive the type of arguments this command accepts, and how to use it.
Example using the terminal
Let’s say we want to view the contents of a folder, create a folder called Example, create a text file using emacs, compile it, run it, and go back to our home directory. To do this, we would simply do the following.
mkdir C++
cd C++
emacs hello_world.cpp
g++ hello_world.cpp
./a.out
cd
Yes there are numerous ways to achieve this, its just a matter of how you want to navigate the terminal.
What now?
If you feel another basic command needs to be here or need more help, simply drop in a line in the comments box! I’ll be sure to put it down.
Expect advanced terminal commands in the near future.


