Chinaunix首页 | 论坛 | 博客
  • 博客访问: 20319
  • 博文数量: 8
  • 博客积分: 1511
  • 博客等级: 上尉
  • 技术积分: 90
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-19 09:34
文章分类
文章存档

2011年(1)

2010年(3)

2009年(4)

我的朋友
最近访客

分类:

2010-10-28 14:32:52

之前用过VirtualBox虚拟机,但是用VB有个很麻烦的事情,不能发送Ctrl+Alt+Fn键切换虚拟终端。因为这个中断会被Host机捕捉到,而有时候又很需要字符终端,总不能每次都切换运行级别吧?

后来看红帽的教材的时候看到一个命令,chvt。很好地解决了这个问题,命令很简单,
# chvt num
num是要切换到的终端。例如我想切换到第二个字符终端,只需要输入
# chvt 2
就可以了。
Here is the man page:
NAME
       chvt - change foreground virtual terminal

SYNOPSIS
       chvt N

DESCRIPTION
       The  command chvt N makes /dev/ttyN the foreground terminal.  (The cor-
       responding screen is created if it did not exist yet.  To  get  rid  of
       unused  VTs,  use deallocvt(1).)  The key combination (Ctrl-)LeftAlt-FN
       (with N in the range 1-12) usually has a similar effect.


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