Useful Linux Commands

  1. !! #Execute the previous command. (Cool command learned from David)
  2. Ctrl +A  #Go to the head of the command line
  3. Ctrl +E  #Go to the end of the command line
  4. Ctrl +P #Show the previous command
  5. history #Show the latest 500 commands
  6. :w !sudo tee % #In vim, edit text file but did not use sudo and can not save the modified file.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s