Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Tuesday, March 26, 2013

Shell Script in Linux

Shell Script in Linux and some examples
 Computers understand only binary languages (0's and 1's),  which are very difficult for humans to understand.  So, for Linux OS (Operating System) there is a special program called Shell. This program accepts instructions or commands from users in English, and converts it to binary languages. We can say it is acts as a mediator for kernel - the heart of Linux. Shell uses the system kernel to execute programs and create files etc.

Shell script is defined as the series of commands written in a text file. Shell scripts have more power than the MS-DOS.

Here is some shell script examples in Linux. First create a file with an extension of .sh, for that take a terminal and type command gedit myshell.sh here i have used gedit you can use any editors, and change the file permissions to executable format, for that we are using chmod 755 filename. For executing this file in terminal "./filename or bash filename".

Palindrome:
Output:
 


Chess board:

Output:


Lets have fun with shell script!

Step wave form:
Output:

Friday, March 8, 2013

Basic Linux Commands


Basic Linux commands

Most of the Linux users should knows the use of basic Linux commands or Linux commands, they are using different commands daily, but windows people they are scared about theses much of commands, if any one saying about Linux their mind will first goes to how we remember all these commands? If you used to see theses commands it will be very easy. For our daily needs these commands are very useful to us. Linux is basically a command oriented operating system, from the starting of Linux it is fully controlled by commands, Now we can see the developed versions of various distributions in Linux, mainly the graphical user interfaces (GUI), for easy usage and graphical visualization.

Here i am introducing some basic commands, for beginners.

pwd : present working directory.

This command will list where we are now?

ls : This command is listing all files and folders.

cd : This command is used for changing the directory,
Ex : cd Directory name

cd - : Switch to previous directory

mkdir : Make directory
Ex : mkdir Directory name

rm -r : Remove directory
Ex: rm -r Directory name

rm -rf : Remove directory Forcefully

chmod : Change the permission of files and folders
Ex: chmod 777 -R dirname 

Friday, July 20, 2012

How to check Ubuntu version using terminal

If somebody asks you about the Ubuntu version of your machine, you might not have a clue about it. Each year Ubuntu Development Team introduces new versions of Ubuntu OS and you might have updated your OS. Also, every time you might not be able to remember the version number. For getting the Ubuntu version easily via terminal follow the steps given below:

--> Take terminal window (from Applications->Accessories->Terminal or press Ctrl+Alt+T).

--> Type the command: lsb_release -a 

You will get this message 

No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 10.04.4 LTS 
Release: 10.04 
Codename: lucid 

Here you can see the Release version of your Ubuntu OS.