basic Linux command 

Hi friends todays I will brief you all basic commands of Linux which is very useful for you. This article help you and  from make zero to hero.

The followings commands used in Linux 

id- this command is used to find out the information about your identity.

who- you can see information about your current logging session by using the who command.

who -umH

pwd- this command is used for check current working directory

ls - used to see hidden file

ls -l used for displayed long list

ls -la

ps- used to see running program

ps au- check running program with users

ps aux | less

logout - exit from shell

ls --help | less

type- this command is to used to find out where the bash she'll command is located

/bin/date - check current date and time

echo $PATH - show the default path

type bash - this command like type is used to see other location of command

history - this command used to check all histories.

history 8 - this command used to show  for last eight history 

! 235 - this command used for check the 235 serial number history 

!! - this command is used to run previous history 

!?date? - check the current date

Piping command -

The (|) pipe metacharacter connect the outputs from one command to the input of another command
$ cat/etc/password|sort|less

Sequential command 

If you want to run sequence of commands with one command completing and next command begins. For this you will be use ; (semicolon)

Background commands

Some command can take a while to complete sometimes you may not want to tie up your she'll waiting for a command to finish in this case you can using this command (&) ampresend.

Expanding command

With command substitution, you can have the output of a command interpreted by the shell instead by the command itself for this you can used $.

Common she'll environment variable 

Bash - contain the full path name of the bash command this is usually /bin/bash

BASH_VERSIO - the number of current version of the bash command.

EUID - this is the effective user ID number of current user.

 FCEDIT - this variable indicate the text editor used by fc command to edit history command.

HISTFILE - the location of history file.

HISTFILE SIZE - the number of history can be stored after this number is reached the oldest commands are deleted.

HISTCMD - this return number of the current command in the history list.

HOME - this is the current working directory.

HOSTTYPE - a value that describe that the computer architecture.

MAIL - this is the location of your mailbox.

OLDPWD - the directory that was the working directory before you change the current directory.

OSTYPE - this is the operating system type

PATH - the colon separated list of the directories used to find command that you type

PPID - the process ID of the command that started the current she'll.

PROMPT_COMMAND - can be set to a command name that is run each time before your she'll prompt display.

PS1 - set the value of your she'll prompt. There are many items that you can read into prompt.

PWD - this is the directory that is assigned as a current directory.

RANDOM - accessing the variable causes a random number to be generated the number is between 0 to 32767.

SECONDS- the number of second since the time the shell was started

SHLVL - the number of she'll level associates with the current she'll session when you login into she'll the SHLVL is 1.

TMOUT - can be set to a number representing the number of second the shell can be idle without receiving input.

UID - the user ID number assigned to your user name. The user ID number is stored in the etc/password file .




Linux short cut keys

Ctrl+a - move the cursor beginning of the command line

Ctrl+b - character backwards it means go backward one character

Ctrl+c delete whole line

Ctrl+d - close terminal

Ctrl+e - end of line it means go to end of the line

Ctrl+f - character forward it means go one character forward

Ctrl+k cut text to the end of the line

Ctrl+l - clear screen 

Ctrl+r - this key is used for reverse search 

Ctrl+t - switch position of current and previous character

Ctrl+u - cut text to the beginning of the line

Ctrl+v - add a special character

Ctrl+w cut the word located behind the cursor

Ctrl+y paste must recently cut text

Alt+b - go backward one word 

Alt+c - change the current word to an initial captial 

Alt+d - cut the word following the cursor

Alt+f - go forward one word

Alt+l - change the current word to lowercase

Alt+n - this Short cut key used for forward search 

Alt+p - this command used for reverse search 

Alt+t switch position of current and previous character

Alt+u change the current word to upercase 

Alt+y rotate back to previousaly cut text and paste it.

Alt+< - bring first entry of history list

Alt+> bring last entry of the history list

Alt+~ complete the text before this point as a user name 

Alt+$ complete the text before this point as a variable

Alt+@ complete the text before this point as a host name

Alt+~ complete the text before this point as a user name.

Alt+$ complete the text before this point as a variable

Alt+@ - complete the text before this point as a host name

Ctrl+x+~ - list possible users name text variable completion

Ctrl+x+@ List possible host name completion.

Ctrl+x! - List possible command name completion