Thursday, 27 February 2014

How to open A shall script file in Linux Ubuntu

If we want to open a new shall script file on your computer then fist we just have to right click on your computer screen then just click on open terminal option where we can see the $ prompt now do as below:-

newfilename.sh

Here newfilename is the name of your shall script file and .sh is the extension of your file.

How to save a already make file in VI text editor in Linux Ubuntu

If we have a already file which is make in vi editor and we want to save that file again with our changes in the file then we just have to follow below steps:-

  1. first press ESC key.
  2. then press :
  3. then press w
  4. then enter key.
Here you go now your file is saved with your changes.  

How to run shall script program in Linux Ubuntu

If we want to run shall script program into Linux Ubuntu the first right click on computer screen then just click on open terminal now you can see $ prompt on your screen now just run below command :-

sh my-program.sh

in above command sh stands for shall script then your program name and then .sh extension of the file then just press enter.  

How to save files in VI text editor in Linux Ubuntu

After inserting data into vi editor file you have to save that data for saving that data you just have to follow below steps :-
  1. First press ESC key.
  2. Then press :
  3. then press w key
  4. then after space just type the file name and press enter key.
Here you go your file is saved with your given name for your help i am going the command below again :-

:w myfile

How to insert data in VI text editor

If you want to insert data in VI text editor then first you have goto $ prompt and the just type vi and the just press i key of your keyboard.
"i" is used to insert data into vi text editor.

How to open VI text editor in Linux Ubuntu

If we want to open VI text editor in our system then just first right click on your Linux Ubuntu computer screen and click on "Open terminal " then you have see a $ command prompt terminal on your screen then just type vi then press enter as below:-

vi 

How to show all directory list in $ prompt in Linux Ubuntu

If we want to know all directory  list in our computer then we have to type the following command in $ prompt on our Linux Ubuntu terminal screen :

ls -l 

This command is show all the directory list in Linux Ubuntu .

How to direct exit without saving file in VI editor in Linux Ubuntu

As we all know that we have use VI editor in Linux Ubuntu for making text files,shall script files and c++ program files and etc.

some times we open the VI editor and don't know how to close it without saving the files so there is two different ways to exit the VI text editor without saving the file :-

1. Just press "ctrl+z "

2. First press ESC key then press : (colon) then q then ! then enter as below

:q! then enter

Wednesday, 26 February 2014

How to GOTO GUI mode from Command Mode in Linux ubuntu in Multi user Mode

If we are in GUI(Graphical user Mode) mode and we want to go back into Command Mode in Linux then we just have to press below keys :-

ctrl+alt+backspace


How to GOTO command mode from GUI Mode in Linux ubuntu

If we are in command mode and we want to go back into GUI(Graphical user mode) in Linux then we just have to goto in $ prompt in our command  mode and type below command :-

startx 

then press enter it takes a while to open your GUI mode.

Note :- Linux Ubuntu is case sensitive so use commands as i type above.