04 January 2012

General Commands You Should Know in Linux/Unix

Leave a Comment
General Commands You Should Know in Linux/Unix (2nd Part) 


GO TO FIRST PART


6. bc : bc command is used to invoke command based calculator. It is less friendly , extremely powerful.
It can be invoke using bc command.

Example


                   $   bc
                    17 +3
                     20
                    ctrl +d             //to end bc


$ bc
17 + 3
20
15 * 3
45



*alternatively we can invoke calculator by using xcalc command , it is a graphical calculator , available in X window and easy to use.



                 
7. passwd : passwd command can be used to change your password.

Example


                     $ passwd
                  Changing password for sandeep.
                  (current) UNIX password: *********
                  Enter new UNIX password: *********
                  Retype new UNIX password: *********
                 passwd: password updated successfully

$ passwd
Changing password for sandeep.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
$



8. who : who  command display information about the user currently logged in same system.

$ who
sandeep tty7 2012-01-08 15:48 (:0)
sandeep pts/0 2012-01-08 16:05 (:0.0)
sandeep pts/1 2012-01-08 16:06 (:0.0)
sandeep pts/2 2012-01-08 16:06 (:0.0)
sandeep pts/3 2012-01-08 16:06 (:0.0)
sandeep pts/4 2012-01-08 16:07 (:0.0)
sandeep pts/5 2012-01-08 16:07 (:0.0)
sandeep pts/6 2012-01-08 16:07 (:0.0)
$




 *1st column represent username.
 * 2nd column represent device name of their respective terminal.     
 * 3rd , 4th  column represent date and time of logging in.
 *last column show from where the user logged in ,as user can log in remotely also.  (0:0 represent user log in locally).     


8. who am i : This command display only that user information who invokes its , it does not show other users information.


$ who am i
sandeep pts/3 2012-01-08 16:06 (:0.0)
$

    
9. lsb_release -a :  This command display information about your Linux Distribution.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
$




10. reset or clear :  Both command used to clear the Screen.




11. uname : It display certain features of the operating system running on your machine.

*if uname used without any option then  it display the name of the operating system.


$ uname
Linux
$ uname -n
sandeep-desktop
$ uname -a
Linux sandeep-desktop 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:40:53 UTC 2011 i686 GNU/Linux
$


*Some important option of uname command


1. uname -n :  displays machine name.
2. uname -r :  display kernel version number.
3. uname -a : display complete information.


12. pwd :  It displays the current working directory or directory in which you are presently working.


$ pwd
/home/sandeep
$ cd /
$ pwd
/
$ cd /etc
$ pwd
/etc
$


CONTINUE WITH GENERAL COMMANDS

If You Liked This Post Please Take a Time To Share This Post

You May Also Like...

0 comments:

Post a Comment