Skip to main content

Basic's of LINUX Command's (Explained usage with UBUNTU / PUTTY / Etc)

Hey All,

Today i will be sharing with you the basic commands you will need to know for using Terminal in UBUNTU or while using PUTTY or any similar terminal version's on Windows

To launch a new Terminal Session on Ubuntu:- Press CTRL + ALT  +  T .

Syntax is defined as the method to write a particular command or statement !

COMMANDS :-

1) The tilde (~) symbol stands for your home directory. If you are user, then the tilde (~) stands for /home/user

2) pwd: The pwd command will allow you to know in which directory you're located (pwd stands for "print working directory"). Example: "pwd" in the Desktop directory will show "~/Desktop". Note that the GNOME Terminal also displays this information in the title bar of its window. A useful gnemonic is "present working directory."

3) mkdir : This command is used to create a new folder .
 Syntax :- mkdir <folder name>
 Example :- mkdir Test ,where "Test" is the folder name that will be created !

4) ls: The ls command will show you ('list') the files in your current directory. Used with certain options, you can see sizes of files, when files were made, and permissions of files. Example: "ls ~" will show you the files that are in your home directory.

5) cd: The cd command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the file system you will use cd. Examples:

                    To navigate into the (Main) root directory, use "cd /"

                    To navigate to your home directory, use "cd" or "cd ~"

                    To navigate up one directory level, use "cd .."

                    To navigate to the previous directory (or back), use "cd -"

                    To navigate through multiple levels of directory at once, specify the full directory path that you want to go to.

For example, use, "cd /var/www" to go directly to the subdirectory of /var i.e. /www.

6) gedit/vi: Syntax for gedit :- "gedit <filename>.<filetype>" .

gedit is the command used for creating new files with the specified filename and open it at the same time for editing .
While vi command is used in place of  gedit in all terminal's with the same usage as of gedit as in Ubuntu.

Syntax for vi :- "vi<filename>.<filetype>"

7) cc : Used to compile the programs .

By default Syntax :- cc <filename>.<filetype>  make the output on a file called a.out .
To save the output to a file named "output.out" the Syntax is :- "cc <filename>.<filetype> -o output.out "

8) .\ :- Used to run the output files .

Syntax :- .\ <filename>.<filetype>

9) i :-  Used to enter 'insert mode' after opening a file in vi mode

10) 'Esc Button' :- Used to exit 'insert mode' after editing a opened file in vi mode

11) :wq or <semicolon>wq :- Used to close and save a opened file

12) :q or <semicolon>q :- Used to only close a opened file

13) echo :- Used to output data / text to the terminal screen
      Syntax : echo <Your Desired Output>
      Example : echo Hello World !

14) cat :- Used to display the content's of a file with some content pre-written in   it

15) touch :- To create a file
      Syntax : touch <Your Desired filename>.<filetype>
      Example : touch Test2.txt

16) cp :- To copy a file/folder from a given directory to another directory
      Syntax : cp <Your Old Folder/File Location> <New File/Folder Destination>
      Example : cp Test2 NewTest

17) mv :- To rename a file/folder from a given name to another name
      Syntax : mv <Your Old Folder/File Name> <New File/Folder Name>
      Example : mv Test2 NewTest2


NOTE :- Operators < and > are used to separate/highlight some expression and is not a part of the syntax .


Source :- Reference Books and Ubuntu Support

This guide was last updated on 28/03/18 and is up to date till the above mentioned date.
I will not be responsible for any damage to your system due to any mistake by you in following the guide correctly !
If you face any difficulties or the steps fail ,try contacting  me ! I will try my best to help you !






Have a nice day !
-Febin Koshy Philip
 Febkosq8

Comments

Popular posts from this blog

MATLAB 2017a (Windows)

Hey All , Today i will be sharing with you the instructions on how to install the latest version to date of MATLAB (2017a) on Windows 64 Bit Architecture along with procedures on cracking it for lifetime for free . I will try my best to make the the guide as easy as i can so that everyone can follow it easily  :) Pre-Requisites :- 1. Mathworks Account 2.MATLAB 2017a Installation file 3.Fairly Decent Internet Connection 4.MATLAB Pre-Activated Crack Procedures :- 1. Create your own Mathworks account if you already don't have created one . Go to  Create Account Link  & enter your own details and follow the on screen instructions . Make sure you have verified your email id before proceeding 2. Go to  Get Trial Licence Link  and login then fill in your details and click the submit button. After that on the next page choose  the products you want to use by clicking the add to cart button and then click Continue . Expert Advice:- If you ...

PUTTY Installation Guide

Hey All, Today i will be sharing with you on how to INSTALL Putty . This application is used for connecting SSH tunnels on Windows OS . Pre-Requisites :- 1) Putty For Windows Installation File . 2) Some General Computer Knowledge Procedure :- 1) Download the software from this link  Download Link For x32 & x64  . Direct Link for x64 OS Also provided at the end of this guide . 2) Open the downloaded file and click the  Next button on the following 2 pages . 3) Click the button Install button and wait till it installs the software ,then press the Finish button. 4) Congratulations ,you have successfully installed PUTTY on you computer ! Downloads :- 1) Link for the x64 Installation File This guide was created on 29/12/18 and is up to date till the versions released till the above mentioned date. I will not be responsible for any damage to your system due to any mistake by you in following the steps correctly ! If you face any di...