Command:

  • ps aux; display all process
  • ifconfig; show ip
  • sudo apt-get update – install updates
  • sudo -i – run as root
  • sudo apt-get install packagename – install package
  • cat /etc/issue : show the version of Ubuntu
  • uname -a : see the architecture and kernel of ubuntu
  • bzip2 -d : uncompress the .zip2 file
  • gzip -d : uncompress the .gz file
  • tar -xvf : uncompress the .tar file
  • startx, start gnome from console
  • update-manager -d : open update manager window
  • sudo apt-get update && sudo apt-get upgrade : upgrade Ubuntu desktop
  • find -name ‘*filenamepathern*’, find the files math the file name pattern
  • sudo update-alternatives –config editor, configure the default editor of Ubuntu
  • xscreensaver-demo, display screen saver
  • git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git, git close the Linux stable version
  • cat /proc/sys/vm/swappiness , display the swappiness of Linux

Tips:

  1. Ctrl + Alt + F1 (F2 – F6), switch to console mode, F1 to tty1,…, F6 to tty6
  2. Alt + F1 (F2 – F6), switch to consoles mode with different level, such tty1 to tty2, by Alt + F2
  3. Alt + F7, switch to GNOME GUI mode

Shortcut:

  • Ctrl + alt + t : open the terminal
  • Ctrl + alt + d : show desktop
  • Alt + F2 : Run an application by typing its name in the box which appears
  • Alt + F1 : Open the Applications menu
  • Emacs: show the ~ location by C-X d ~/

Emacs Tips

  1. Copy and Paste: http://emacswiki.org/emacs/CopyAndPaste
    1. C-w : Cut (really kill),
    2. M-w : Copy (really kill-ring-save)
    3. C-y : Paste (really yank)
    4. M-y (after C-y):Historic Paste of old cuts/copies
  2. Search & Replace, RET means Enter Key
    1. M-x replace-string RET your_search_string RET your_replace_string
  3. New Line in emacs is Ctrl + q Ctrl + j; example: M+x replace-string RET ctrl+q ctrl + j RET *
  4. C-x left and C-x right,; switch to previous buffer and next buffer.
  5. Ctrl-X, Ctrl-W, Save As
  6. Ctrl-X, K, Close Window/Buffer
  7. Ctrl-_, Undo
  8. Ctrl-SPC, Begin Selection
  9. Meta-DEL, Delete Word
  10. Meta-D, Fwd Delete Word
  11. Meta-{, Move by Paragraph
  12. Meta-X goto-line, Goto Line Number
  13. Meta-Control-\, Indent Selection
  14. Meat-U, Uppercase Word
  15. Meta-C, Capitalize Word
  16. M-$, Check and correct spelling of the word at point
  17. M-x ispell, Check and correct spelling of all words in the buffer
  18. M-x ispell-buffer, Check and correct spelling in the buffer
  19. F10, Active Emacs menu
  20. Enable line number in emacs: add plus linum and follow the post to configure, http://emacswiki.org/emacs/LineNumbers

Related reference:

https://help.ubuntu.com/community/KeyboardShortcuts

Advertisements