Tuesday, December 4, 2012

Useful Linux Console Commands and tricks

Every day I learn a new command or trick and then if I do not use again or I need it later I search for it again and spend a lot of time on that. So, I know the best efficient way to track knowledge we learned is by writing it.


List of Commands I find while I am working and I hope this will help me later and you too!



"dmesg"'  Print or Control the Kernel ring buffer
That is to print the bootup messages.  and you can direct the output messages to a file by using 
dmesg ? boot.messages
Then use a text editor to view that output
You can also use
dmesg | grep sometext
where some text is any text you searching for in the output of dmesg.  so if you searching for tty occurrence in booting up process you need to type   dmesg | grep tty

who  will list all users logged in to the same


cat  >  file_name.txt   Will create the file name and allow you to enter text and save it

which find out what a command path is.
for example, use
which adduser  -->  the return should be /bin/adduser
or
which passwd   -->  the return should be /usr/bin/passwd


passwd  to change your password or another user password


nano is a great editor if you have a basic linux console and do not have the GUI

tar     un-tar a compressed file
use tar xvjf \path_to_file_with_ext_.tar.bz2
use tar -zxvf \path_to_file_with_ext_.tgz



Some Good References:
https://help.ubuntu.com/community/UsingTheTerminal

No comments:

Post a Comment