Thursday, August 20, 2009

Basic Linux

1. We can login in Linux through GUI or virtual console. We can switch to different virtual consoles by pressing Ctrl+Alt+F[1-7] keys together. We can move into any virtual consoles. (Try in Red Hat)

2. When Linux is installed the default user created is root.

3. Some basic Linux commands are:-

(a.) pwd (Present Working Directory)
for root user it will show /root
for other user it will show /home/sam (e.g. sam is user)

(b.) clear (To clear screen) or Ctrl+l

(c.) ls (Shows list of files and directories)

(d.) ls -l or ll ( Long listing of files and directories)

(e.) ls -lh ( -h is for human readable i.e. size for files or directories. )

(f.) ls -la (-a for all. lists all files and directories including hidden files)

(g.) man e.g. man ls (Manual for command along with options. Helps to get more options for command)

(h.) info e.g. info ls (Detailed information about command)
Note:- Ctr+c or Q to exit from manual page.

(i.) useradd e.g. useradd sam (Creates new user)

(j.) passwd e.g. passwd sam (Assigns password to user)

(k.) id (Print identity for the user)

(l.) who (Lists users currently logged in)

(m.) whoami (List currently logged in user)

(n.) who am i (Shows the virtual console of the current logged in user. e.g. pts pseudo terminal)

(o.) tty (Lists the terminal type)

(p.) mkdir (Creates a new directory)

(q.) rmdir (Remove directory if directory is empty)

(r.) cd .. (Takes you to previous directory)

(s.) cd . (Current directory)

(t.) rm -rf (Removes directory, files and sub directory into it. -r for recursively and f for forcefully)

(u.) userdel -r (Removes user)

Sunday, April 5, 2009

Can you undo a send mail?

You will be amazed to know that I can undo a send mail. I don't have any magic stick even you can also do that :). Gmail has a utility by which you can stop a mail from sending after hit send button.

This is important when we just send the incomplete mail just mistakenly hit the button or forget to attach the necessary files.

Please follow these steps:-
1. Login to your existing Gmail account.
2. Click on Settings option.
3. Now click on Labs tab.
4. Scroll down the page unless you find "Undo Send" option. It is almost at the bottom of the page. By default this is disabled. Enable this option.

Now when you hit the Send button you will have 5 seconds to Undo the mail to deliver to its destination. Click at the undo link will revert back to compose.