Linux的图形模式和文本模式以及单用户模式切换,

2019-11-12 08:17 来源:未知

1.默认开机进入文本模式

如果想让开机自动进纯文本模式,

修改/etc/inittab

找到其中的

id:5:initdefault:

这行指示启动时的运行级是5,也就是图形模式

改成3就是文本模式了

id:3:initdefault:

这是因为Linux操作系统有六种不同的运行级(run level),在不同的运行级下,系统有着不同的状态,这六种运行级分别为:

0:停机(记住不要把initdefault 设置为0,因为这样会使Linux无法启动)

1:单用户模式,就像Win9X下的安全模式。

2:多用户,但是没有 NFS 。

3:完全多用户模式,标准的运行级。

4:一般不用,在一些特殊情况下可以用它来做一些事情。

5:X11,即进到 X-Window 系统。

6:重新启动 (记住不要把initdefault 设置为6,因为这样会使Linux不断地重新启动)。

其中运行级3就是我们要进入的标准Console字符界面模式。

 

2.强行退出X-Window进入文本模式

打开一个终端

输入init 3

(注意init后面有一个空格)  等一会就进入了图形界面

以上方法切换后,窗口模式完全关闭.如果窗口中有文件未保存,将丢失.

(用init 5可以回到图形界面,但原来的进程已死)

 

3.不退出X-Window进入文本模式

在X-Window图形操作界面中按"Alt+Ctrl+功能键Fn"(n=1~6),就可以进入文本模式界面。这就意味着你可以同时拥有X-Window加上6个文本模式界面

按“Alt+Ctrl+F7”即可从文本模式界面回到X-Window图形操作界面。这时Linux默认打开7个屏幕,编号为tty1~tty7。

X-Window启动后,占用的是tty7号屏幕,tty1~tty6仍为字符界面屏幕。也就是说,用“Alt+Ctrl+Fn”组合键即可实现字符界面与X Window界面的快速切换。

当X-Window由于自身或应用程序而失去响应或崩溃时,我们可以非常方便地退出X-Window进入Console进行故障处理


1、如果在安装的时候你选择的默认格式是:桌面图形格式是:

ctrl+alt+f1  图形--->文本格式

alt+f7        文本格式===图形界面

2、如果在安装的时候你选择的默认格式是:文本格式

startx 即转换到图形界面

图片 1图片 2

  1. 右键点击任务管理器
 1 //SYSMETS.H -- System metrics display structure
 2 #include <Windows.h>
 3 
 4 #define NUMLINES ((int) (sizeof(sysmetrics) / sizeof(sysmetrics[0])))
 5 
 6 struct  
 7 {
 8     int iIndex;
 9     TCHAR *szLabel;
10     TCHAR *szDesc;
11 }
12 sysmetrics[] =
13 {
14     SM_CXSCREEN,            TEXT("SM_CXSCREEN"),            TEXT("Screen width in pixels"),
15     SM_CYSCREEN,            TEXT("SM_CYSCREEN"),            TEXT("Screen height in pixels"),
16     SM_CXVSCROLL,            TEXT("SM_CXVSCROLL"),            TEXT("Vertical scroll width"),
17     SM_CYHSCROLL,            TEXT("SM_CYHSCROLL"),            TEXT("Horizontal scroll height"),
18     SM_CYCAPTION,            TEXT("SM_CYCAPTION"),            TEXT("Caption bar height"),
19     SM_CXBORDER,            TEXT("SM_CXBORDER"),            TEXT("Window border width"),
20     SM_CYBORDER,            TEXT("SM_CYBORDER"),            TEXT("Window border height"),
21     SM_CXFIXEDFRAME,        TEXT("SM_CXFIXEDFRAME"),        TEXT("Dialog window frame width"),
22     SM_CYFIXEDFRAME,        TEXT("SM_CYFIXEDFRAME"),        TEXT("Dialog window frame height"),
23     SM_CYVTHUMB,            TEXT("SM_CYVTHUMB"),            TEXT("Vertical scroll thumb height"),
24     SM_CXHTHUMB,            TEXT("SM_CXHTHUMB"),            TEXT("Horizontal scroll thumb width"),
25     SM_CXICON,                TEXT("SM_CXICON"),                TEXT("Icon width"),
26     SM_CYICON,                TEXT("SM_CYICON"),                TEXT("Icon height"),
27     SM_CXCURSOR,            TEXT("SM_CXCURSOR"),            TEXT("Cursor width"),
28     SM_CYCURSOR,            TEXT("SM_CYCURSOR"),            TEXT("Cursor height"),
29     SM_CYMENU,                TEXT("SM_CYMENU"),                TEXT("Menu bar height"),
30     SM_CXFULLSCREEN,        TEXT("SM_CXFULLSCREEN"),        TEXT("Full screen client area width"),
31     SM_CYFULLSCREEN,        TEXT("SM_CYFULLSCREEN"),        TEXT("Full screen client area height"),
32     SM_CYKANJIWINDOW,        TEXT("SM_CYKANJIWINDOW"),        TEXT("Kanji window height"),
33     SM_MOUSEPRESENT,        TEXT("SM_MOUSEPRESENT"),        TEXT("Mouse present flag"),
34     SM_CYVSCROLL,            TEXT("SM_CYVSCROLL"),            TEXT("Vertical scroll arrow height"),
35     SM_CXHSCROLL,            TEXT("SM_CXHSCROLL"),            TEXT("Horizontal scroll arrow width"),
36     SM_DEBUG,                TEXT("SM_DEBUG"),                TEXT("Debug version flag"),
37     SM_SWAPBUTTON,            TEXT("SM_SWAPBUTTON"),            TEXT("Mouse buttons swapped flag"),
38     SM_CXMIN,                TEXT("SM_CXMIN"),                TEXT("Minimum window width"),
39     SM_CYMIN,                TEXT("SM_CYMIN"),                TEXT("Minimum window height"),
40     SM_CXSIZE,                TEXT("SM_CXSIZE"),                TEXT("Min/Max/Close button width"),
41     SM_CYSIZE,                TEXT("SM_CYSIZE"),                TEXT("Min/Max/Close button height"),
42     SM_CXSIZEFRAME,            TEXT("SM_CXSIZEFRAME"),            TEXT("Window sizing frame width"),
43     SM_CYSIZEFRAME,            TEXT("SM_CYSIZEFRAME"),            TEXT("Window sizing frame height"),
44     SM_CXMINTRACK,            TEXT("SM_CXMINTRACK"),            TEXT("Minimum window tracking width"),
45     SM_CYMINTRACK,            TEXT("SM_CYMINTRACK"),            TEXT("Minimum window tracking height"),
46     SM_CXDOUBLECLK,            TEXT("SM_CXDOUBLECLK"),            TEXT("Double click x tolerance"),
47     SM_CYDOUBLECLK,            TEXT("SM_CYDOUBLECLK"),            TEXT("Double click y tolerance"),
48     SM_CXICONSPACING,        TEXT("SM_CXICONSPACING"),        TEXT("Horizontal icon spacing"),
49     SM_CYICONSPACING,        TEXT("SM_CYICONSPACING"),        TEXT("Vertical icon spacing"),
50     SM_MENUDROPALIGNMENT,    TEXT("SM_MENUDROPALIGMENT"),    TEXT("Left or right menu drop"),
51     SM_PENWINDOWS,            TEXT("SM_PENWINDOWS"),            TEXT("Pen extensions installed"),
52     SM_DBCSENABLED,            TEXT("SM-DBCSENABLED"),            TEXT("Double-Byte Char Set enable"),
53     SM_CMOUSEBUTTONS,        TEXT("SM_CMOUSEBUTTONS"),        TEXT("Number of mouse buttons"),
54     SM_SECURE,                TEXT("SM_SECURE"),                TEXT("Security present flag"),
55     SM_CXEDGE,                TEXT("SM_CXEDGE"),                TEXT("3-D border width"),
56     SM_CYEDGE,                TEXT("SM_CYEDGE"),                TEXT("3-D border height"),
57     SM_CXMINSPACING,        TEXT("SM_CXMINSPACING"),        TEXT("Minimized window spacing width"),
58     SM_CYMINSPACING,        TEXT("SM-CYMINSPACING"),        TEXT("Minimized window spacing height"),
59     SM_CXSMICON,            TEXT("SM_CXSMICON"),            TEXT("Small icon width"),
60     SM_CYSMICON,            TEXT("SM_CYSMICON"),            TEXT("Small icon height"),
61     SM_CYSMCAPTION,            TEXT("SM_CYSMCAPTION"),            TEXT("Small caption height"),
62     SM_CXSMSIZE,            TEXT("SM_CXSMSIZE"),            TEXT("Small caption button width"),
63     SM_CYSMSIZE,            TEXT("SM_CYSMSIZE"),            TEXT("Small caption button height"),
64     SM_CXMENUSIZE,            TEXT("SM_CXMENUSIZE"),            TEXT("Menu bar button width"),
65     SM_CYMENUSIZE,            TEXT("SM_CYMENUSIZE"),            TEXT("Menu bar button height"),
66     SM_ARRANGE,                TEXT("SM_ARRANGE"),                TEXT("How minimized windows arranged"),
67     SM_CXMINIMIZED,            TEXT("SM_CXMINIMIZED"),            TEXT("Minimized window width"),
68     SM_CYMINIMIZED,            TEXT("SM_CYMINIMIZED"),            TEXT("Minimized window height"),
69     SM_CXMAXTRACK,            TEXT("SM_CXMAXTRACK"),            TEXT("Maximum draggable width"),
70     SM_CYMAXTRACK,            TEXT("SM_CYMAXTRACK"),            TEXT("Maximum draggable height"),
71     SM_CXMAXIMIZED,            TEXT("SM_CXMAXIMIZED"),            TEXT("Width of maximized window"),
72     SM_CYMAXIMIZED,            TEXT("SM_CYMAXIMIZED"),            TEXT("Height of maximized windwo"),
73     SM_NETWORK,                TEXT("SM_NETWORK"),                TEXT("Network present flag"),
74     SM_CLEANBOOT,            TEXT("SM_CLEANBOOT"),            TEXT("How system was booted"),
75     SM_CXDRAG,                TEXT("SM_CXDRAG"),                TEXT("Avoid drag x tolerance"),
76     SM_CYDRAG,                TEXT("SM_CYDRAG"),                TEXT("Avoid drag x tolerance"),
77     SM_SHOWSOUNDS,            TEXT("SM_SHOWSOUNDS"),            TEXT("Present sounds visually"),
78     SM_CXMENUCHECK,            TEXT("SM_CXMENUCHECK"),            TEXT("Menu check-mark width"),
79     SM_CYMENUCHECK,            TEXT("SM_CYMENUCHECK"),            TEXT("Menu check-mark height"),
80     SM_SLOWMACHINE,            TEXT("SM_SLOWMACHINE"),            TEXT("Slow processor flag"),
81     SM_MIDEASTENABLED,        TEXT("SM_MIDEASTENABLE"),        TEXT("Hebrew and Arabic enabled flag"),
82     SM_MOUSEWHEELPRESENT,    TEXT("SM_MOUSEWHEELPRESENT"),    TEXT("Mouse wheel present flag"),
83     SM_XVIRTUALSCREEN,        TEXT("SM_XVIRTUALSCREEN"),        TEXT("Virtual screen x origin"),
84     SM_YVIRTUALSCREEN,        TEXT("SM_YVIRTUALSCREEN"),        TEXT("Virtual screen y origin"),
85     SM_CXVIRTUALSCREEN,        TEXT("SM_CXVIRTUALSCREEN"),        TEXT("Virtual screen width"),
86     SM_CYVIRTUALSCREEN,        TEXT("SM_CYVIRTUALSCREEN"),        TEXT("Virtual screen height"),
87     SM_CMONITORS,            TEXT("SM_CMONITORS"),            TEXT("Number of monitors"),
88     SM_SAMEDISPLAYFORMAT,    TEXT("SM_SAMEDISPLAYFORMAT"),    TEXT("Same color format flag")
89 };

2.打开资源监视器

SYSMETS.H

图片 3

TAG标签:
版权声明:本文由澳门金莎娱乐网站发布于澳门金莎娱乐网站,转载请注明出处:Linux的图形模式和文本模式以及单用户模式切换,