Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5761931
  • 博文数量: 675
  • 博客积分: 20301
  • 博客等级: 上将
  • 技术积分: 7671
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-31 16:15
文章分类

全部博文(675)

文章存档

2012年(1)

2011年(20)

2010年(14)

2009年(63)

2008年(118)

2007年(141)

2006年(318)

分类: LINUX

2006-10-31 09:09:17

Linux has many keyboard shortcuts. Knowing them makes using Linux much easier.

Console/terminal

  • Ctrl-Alt-Delete - shuts down computer
  • Alt-Fn (F1, F2, F3,…) - switch to n-th console
  • Alt-Left or Alt-Right - switch to next/previous virtual terminal
  • Ctrl-K - clears command line from cursor position to end of line.
    Example of use: CTRL-K
  • Ctrl-U - clears command line from cursor position to beginning of line.
  • Ctrl-W - clears word to the left
  • Ctrl-A - moves cursor to beginning of command line.
  • Tab - command-line autocompletion. Automatically completes current command line.
    Example of use: autocompletion using TAB

    If autocompletion script is enabled, then also options and applications parameters are autocompleted.

  • Scroll Lock - locks terminal input/output - allows to read console contents when output is going too fast. To unlock, press Scroll Lock once again.

    Alternatively, Scroll Lock can be enabled using Ctrl-S and disabled with Ctrl-Q. Try last shortcut if your console hangs for unknown reason - it happened to me many times that I’ve locked it accidentaly by pressing CTRL-S.

  • Shift-Page Up and Shift-Page Down - scrolls console buffer up/down. Works also when Scroll Lock is enabled. After changing the terminal (Alt-Fn) buffer contents is erased and it is impossible to scroll it.
  • Ctrl-L - screen refresh

Kernel shortcuts

Following shortcuts must be enabled in kernel, they also must be enabled using proc interface (echo 1 > /proc/sys/kernel/sysrq).

  • Alt-SysRQ-S - sync all mounted filesystem. Data in buffers is immediately written to disks.
  • Alt-SysRQ-U - remounts mounted filesystems read-only
  • Alt-SysRQ-B - performs immediate reboot. Don’t do it without syncing and unmounting as it can cause massive filesystem corruption
  • Alt-SysRQ-S, then Alt-SysRQ-U, then Alt-SysRQ-B - attempts to sync all mounted filesystems, remounts them read-only and immediately reboots computer. Fastest way to reboot Linux.

X-Windows shortcuts

  • Ctrl-Alt-Plus or Ctrl-Alt-Minus-
    changes screen resolution (higher/lower). Only if X-Windows server is configured for multiple resolutions.
  • Ctrl-Alt-Backspace - kill X-server. Running applications will be terminated.
  • Ctrl-Alt-Fn (F1, F2, F3,…) - switches to n-th text console.

Do you know any other shortcuts that are worth to know?

阅读(1674) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~