{"id":204696,"date":"2020-11-16T09:12:23","date_gmt":"2020-11-16T01:12:23","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=204696"},"modified":"2020-11-03T09:05:24","modified_gmt":"2020-11-03T01:05:24","slug":"linux-terminal-windowsx","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-terminal-windowsx.html","title":{"rendered":"Linux\u4e2d\u7ec8\u7aef\u754c\u9762\u4e0e\u56fe\u5f62\u754c\u9762\u4e4b\u95f4\u7684\u5207\u6362\u5173\u7cfb"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5176\u5b9e\u5355\u7eaf\u7684\u4ece\u547d\u4ee4\u754c\u9762\u4e0e\u56fe\u5f62\u754c\u9762\u4e4b\u95f4\u7684\u5207\u6362\u662f\u5f88\u5bb9\u6613\u7684\uff0c\u5c31\u90a3\u4e48\u51e0\u4e2a\u547d\u4ee4\uff0c\u4f46\u662f\u8981\u5f7b\u5e95\u5f04\u61c2\u8fd9\u80cc\u540e\u7684\u8bbe\u8ba1\u67b6\u6784\u9700\u8981\u6d89\u53ca\u5230\u5f88\u591a\u7684\u6982\u5ff5\uff0c\u672c\u6587\u4e3a\u4f60\u8bb2\u89e3Ubuntu 18.10\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684X Window\uff0c\u5185\u5bb9\u662f\u4e86\u89e3\u81ea\u5df1\u673a\u5668\u4e0a\u7684 X Window\u3001\u7406\u89e3 display \u548c\u865a\u62df\u63a7\u5236\u53f0\u3001\u8fdc\u7a0b\u8fde\u63a5 X Server\u3001\u7406\u89e3 DisplayManager \u548c X Window \u684c\u9762\u73af\u5883\u7684\u542f\u52a8\u8fc7\u7a0b\u548c\u8fd0\u884c\u5d4c\u5957\u7684 X Server\u7b49\u8fd9\u4e9b\u57fa\u672c\u6982\u5ff5\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u4e00\u3001 \u4ec0\u4e48\u662fX Window<\/strong><\/div>\n

X Window\u4e0d\u662f\u67d0\u4e00\u4e2a\u5177\u4f53\u7684\u7a97\u4f53\u754c\u9762\uff0cX Window \u672c\u8d28\u662f\u4e00\u4e2a\u5206\u5c42\u7684\u67b6\u6784\uff0c\u5b83\u5206\u4e3a Server \u548c Client\u3002X Server \u8d1f\u8d23\u56fe\u5f62\u754c\u9762\u7684\u663e\u793a\u548c\u7528\u6237\u7684\u8f93\u5165\uff0c\u800cClient \u7a0b\u5e8f\u9700\u8981\u8fde\u63a5\u5230 X Server\uff0c\u7136\u540e\u8bf7\u6c42 X Server \u7ed8\u5236\u56fe\u5f62\u754c\u9762\uff0c\u540c\u65f6\u4ece X Server \u63a5\u53d7\u7528\u6237\u7684\u8f93\u5165\u3002\u5728\u684c\u9762\u7cfb\u7edf\u4e0a\uff0cX Server \u548c Client \u7a0b\u5e8f\u5f80\u5f80\u5b89\u88c5\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\uff0c\u65e5\u5e38\u4f7f\u7528\u57fa\u672c\u611f\u89c9\u4e0d\u5230\u5b83\u662f\u5206\u5c42\u7684\u3002\u5c31\u50cf\u6211\u4eec\u7684\u4e00\u53f0\u7535\u8111\uff0cX Server\u548cClient\u662f\u5728\u540c\u4e00\u53f0\u7535\u8111\u7684\u3002<\/p>\n

\u65e2\u7136X Window\u662f\u5206\u5c42\u7684\u67b6\u6784\uff0c\u5f88\u663e\u7136\uff0cX Server \u548c Client \u4e5f\u53ef\u4ee5\u5206\u522b\u8fd0\u884c\u5728\u4e0d\u540c\u7684\u673a\u5668\u4e0a\uff0c\u5728\u4e00\u53f0\u673a\u5668\u4e0a\u8fd0\u884c\u7a0b\u5e8f\uff0c\u800c\u5728\u53e6\u5916\u4e00\u53f0\u673a\u5668\u4e0a\u663e\u793a\u56fe\u5f62\u754c\u9762\u3002<\/p>\n

\u5f88\u591a\u4eba\u8003\u5230\u8fd9\u91cc\u5c31\u6709\u70b9\u8499\u4e86\uff0c\u6211\u4eec\u5728\u7f16\u5199\u7f51\u7ad9\u7684\u65f6\u5019\u4e5f\u6709Server-Client\u5206\u5c42\u67b6\u6784\u554a\uff0c\u90a3\u8fd9\u6709\u533a\u522b\u5417\uff1f\u5f53\u7136\u6709\u4e86\u3002<\/p>\n

X Window \u4e2d\u7684 Server \u548c Client \u7684\u6982\u5ff5\u548c\u6211\u4eec\u5e73\u65f6\u63a5\u89e6\u5230\u7684\u201cServer\/Client\u201d\u6982\u5ff5\u521a\u597d\u76f8\u53cd\u3002\u5f88\u591a\u719f\u6089 Internet \u539f\u7406\u7684\u4eba\uff0c\u7b2c\u4e00\u6b21\u63a5\u89e6 X Window \u7684\u8fd9\u4e24\u4e2a\u6982\u5ff5\u90fd\u4f1a\u641e\u9519\u3002\u5728Internet\u91cc\u9762\u7684Server\/Client\uff0c\u662fServer\u8d1f\u8d23\u5904\u7406\u76f8\u5173\u7684\u4e1a\u52a1\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u8fd4\u56de\u5230Client\u5ba2\u6237\u7aef\uff0c\u4f46\u662fX Window\u6070\u597d\u662f\u76f8\u53cd\u7684\uff0c\u5b83\u662fClient\u8d1f\u8d23\u5904\u7406\uff0cServer\u8d1f\u8d23\u663e\u793a\u3002<\/p>\n

\u6bd4\u5982\uff0c\u6211\u6709\u4e24\u53f0\u7535\u8111\uff0c\u4e00\u53f0\u672c\u5730\u673a\u5668\u4e0a\u8fd0\u884c Ubuntu 18.10 \u684c\u9762\u7248\uff0c\u800c\u5728\u53e6\u5916\u4e00\u53f0\u8fdc\u7a0b\u673a\u5668\u4e0a\u8fd0\u884c CentOS 7\uff08\u7eaf\u5b57\u7b26\u754c\u9762\uff09\uff0c\u5982\u679c\u662fInternet\u91cc\u9762\u7684Server\/Client\u67b6\u6784\uff0cUbuntu \u662f Client\uff0c\u800c CentOS \u662f Server\u3002<\/p>\n

\u4f46\u662f\u5728 X Window \u4e2d\uff0cServer \u504f\u504f\u662f\u6211\u9762\u524d\u7684\u8fd9\u53f0 Ubuntu\uff0cX Server \u8fd0\u884c\u5728 Ubuntu \u4e0a\u3002\u6211\u53ef\u4ee5\u5728 CentOS \u4e2d\u8fd0\u884c GVim\uff0c\u4f46\u662f\u7a97\u53e3\u663e\u793a\u5728 Ubuntu \u4e2d\uff0c\u8fd9\u65f6\uff0cGVim \u662f\u4e00\u4e2a Client \u7a0b\u5e8f\uff0c\u5b83\u5728\u8fdc\u7a0b\u673a\u5668\u4e0a\u8fd0\u884c\uff0c\u800c\u5b83\u7684\u7a97\u53e3\u663e\u793a\u5728\u672c\u5730\u3002<\/p>\n

\u4e8c\u3001\u7406\u89e3 display \u548c\u865a\u62df\u63a7\u5236\u53f0<\/strong><\/div>\n

\u7f51\u4e0a\u5f88\u591a\u4ecb\u7ecd X Window \u7684\u6587\u7ae0\u90fd\u662f\u5148\u8ba9\u7cfb\u7edf\u8fdb\u5165\u5b57\u7b26\u754c\u9762\uff0c\u7136\u540e\u624b\u52a8\u542f\u52a8\u4e00\u4e2a X Server\u3002\u5176\u5b9e\u8fd9\u5b8c\u5168\u6ca1\u6709\u5fc5\u8981\uff0c\u56e0\u4e3a\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u5b8c\u5168\u53ef\u4ee5\u8fd0\u884c\u591a\u4e2a X Server\uff0c\u53ea\u9700\u8981\u8ba9\u6bcf\u4e2a X Server \u7684 display \u4e0d\u540c\u5373\u53ef\u3002\u90a3\u4e48 display \u7a76\u7adf\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u5b9e\u9645\u4e0a\uff0cdisplay \u5c31\u662f\u8ba1\u7b97\u673a\u914d\u5907\u7684\u4e00\u5957\u8f93\u5165\u8f93\u51fa\u8bbe\u5907\uff0c\u4e00\u4e2a\u7535\u8111\u53ef\u4ee5\u6709\u591a\u4e2a\u8f93\u5165\u8f93\u51fa\u8bbe\u5907\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u53ea\u6709\u4e00\u4e2a\u3002<\/p>\n

\u5728 X Window \u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7 hostname:display_number.screen_number \u6765\u6307\u5b9a\u4e00\u4e2a\u5c4f\u5e55\u3002\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3\uff1a\u4e00\u53f0\u8ba1\u7b97\u673a\u53ef\u4ee5\u6709\u591a\u4e2a display\uff0c\u4e00\u4e2a display \u53ef\u4ee5\u6709\u591a\u4e2a\u5c4f\u5e55\u3002\u6240\u4ee5\uff0cdisplay \u76f8\u5f53\u4e8e\u662f\u8ba1\u7b97\u673a\u914d\u5907\u7684\u4e00\u5957\u8f93\u5165\u8f93\u51fa\u8bbe\u5907\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u4e00\u53f0\u7535\u8111\u53ea\u914d\u4e00\u5957\u952e\u76d8\u9f20\u6807\u548c\u4e00\u4e2a\u663e\u793a\u5668\uff0c\u7279\u6b8a\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u914d\u591a\u4e2a\u663e\u793a\u5668\u3002<\/p>\n

\u73b0\u5728\u95ee\u9898\u51fa\u6765\u4e86\uff0c\u6211\u7684\u7535\u8111\u53ea\u6709\u4e00\u5957\u952e\u76d8\u9f20\u6807\u548c\u4e00\u4e2a\u663e\u793a\u5668\uff0c\u4e5f\u5c31\u662f\u53ea\u6709\u4e00\u4e2a display\uff0c\u90a3\u53c8\u600e\u4e48\u80fd\u8fd0\u884c\u591a\u4e2a X Server \u5462\uff1f\u90a3\u662f\u56e0\u4e3a\u5728 Linux \u4e2d\uff0c\u8fd8\u6709\u865a\u62df\u63a7\u5236\u53f0\u8fd9\u6837\u7684\u9ad8\u7ea7\u7279\u6027\u3002\u53ea\u9700\u8981\u540c\u65f6\u6309\u4e0b Ctrl+Alt+F1\u3001Ctrl+Alt+F2\u3001...\u3001Ctrl+Alt+F7\uff0c\u5c31\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u865a\u62df\u63a7\u5236\u53f0\u4e2d\u8fdb\u884c\u5207\u6362\u3002\u5c31\u76f8\u5f53\u4e8e\u662f\u7ed9\u8fd9\u4e2a\u7535\u8111\u914d\u5907\u4e867\u4e2a\u4e0d\u540c\u7684\u663e\u793a\u5668\u3002<\/p>\n

\u6ce8\u610f\uff1a\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cLinux\u4f1a\u63d0\u4f9b6\u4e2aTerminal \u6765\u8ba9\u7528\u6237\u767b\u5f55\uff0c\u5207\u6362\u7684\u65b9\u5f0f\u4e3aCtrl+Alt+F1\u5230F6.\u800c\u4e14\uff0c\u7cfb\u7edf\u4f1a\u4e3a\u8fd96\u4e2a\u7ec8\u7aef\u754c\u9762\u4ee5 tty1\u3001tty2\u3001tty3\u3001tty4\u3001tty5\u3001tty6 \u7684\u547d\u540d\u65b9\u5f0f\u547d\u540d\uff0c\u9664\u6b64\u4e4b\u5916\uff0cLinux\u8fd8\u6709\u4e00\u4e2a\u9ed8\u8ba4\u7684X\u7a97\u53e3\u684c\u9762\uff0c\u4f7f\u7528Ctrl+Alt+F7\uff0c\u59d0\u53ef\u4ee5\u5207\u6362\u5230\u56fe\u5f62\u684c\u9762\u8fdb\u884c\u767b\u5f55\u4e86\u3002\u4e3a\u4ec0\u4e48\u7528tty\u6765\u547d\u540d\u5462\uff1f<\/p>\n

tty\uff1a\u7ec8\u7aef\u8bbe\u5907\u7684\u7edf\u79f0\u3002<\/p>\n

tty\u4e00\u8bcd\u6e90\u4e8eTeletypes\uff0c\u6216\u8005teletypewriters\uff0c\u539f\u6765\u6307\u7684\u662f\u7535\u4f20\u6253\u5b57\u673a\uff0c\u662f\u901a\u8fc7\u4e32\u884c\u7ebf\u7528\u6253\u5370\u673a\u952e\u76d8\u901a\u8fc7\u9605\u8bfb\u548c\u53d1\u9001\u4fe1\u606f\u7684\u4e1c\u897f\uff0c\u540e\u6765\u8fd9\u4e1c\u897f\u88ab\u952e\u76d8\u4e0e\u663e\u793a\u5668\u53d6\u4ee3\uff0c\u6240\u4ee5\u73b0\u5728\u53eb\u7ec8\u7aef\u6bd4\u8f83\u5408\u9002\u3002\u7ec8\u7aef\u662f\u4e00\u79cd\u5b57\u7b26\u578b\u8bbe\u5907\uff0c\u5b83\u6709\u591a\u79cd\u7c7b\u578b\uff0c\u901a\u5e38\u4f7f\u7528tty\u6765\u7b80\u79f0\u5404\u79cd\u7c7b\u578b\u7684\u7ec8\u7aef\u8bbe\u5907\u3002Linux\u9ed8\u8ba4\u60c5\u51b5\u4e0b<\/p>\n

tty1\uff5e6\u662f\u6587\u672c\u578b\u63a7\u5236\u53f0\uff0ctty7\u662fX Window\u56fe\u5f62\u663e\u793a\u7ba1\u7406\u5668\u3002<\/p>\n

\u4f46\u662fLinux\u4e0d\u540c\u7684\u53d1\u884c\u7248\u672c\u4e0a\u9762\u7684\u56fe\u5f62\u684c\u9762\u548c\u7528\u6237\u7ec8\u7aef\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\u3002<\/p>\n

\u6bd4\u5982\u5728 Ubuntu 18.10 \u4e2d\uff0c\u865a\u62df\u63a7\u5236\u53f0 3 \u5230 6 \u8fd0\u884c\u7684\u662f tty\uff0c\u4e5f\u5c31\u662f\u5b57\u7b26\u754c\u9762\uff0c\u5373Ctrl+Alt+F3\u5230F6\u5206\u522b\u663e\u793atty3\u3001tty4\u3001tty5\u3001tty6\uff0c\u865a\u62df\u63a7\u5236\u53f0 2 \u8fd0\u884c\u7684\u662f Xorg\uff0c\u865a\u62df\u63a7\u5236\u53f0 1 \u8fd0\u884c\u7684\u662f\u56fe\u5f62\u754c\u9762\u3002<\/p>\n

\u4e09\u3001Terminal\u4e0eX Window\u7684\u4e92\u76f8\u8f6c\u5316<\/strong><\/div>\n

\u524d\u9762\u7684\u4f7f\u7528Ctrl+Alt+Fn\u7684\u5f62\u5f0f\u6765\u56de\u5207\u6362\u53ea\u662f\u5f62\u5f0f\u4e0a\u7684\u8f6c\u6362\uff0c\u6bcf\u4e00\u4e2a\u90fd\u5728\u8fd0\u884c\uff0c\u53ea\u4e0d\u8fc7\u663e\u793a\u7684\u90a3\u4e00\u4e2a\u4e0d\u540c\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\uff0cTerminal\u4e0eX Window\u5728Linux\u4e2d\u7684\u8fd0\u884c\u7b49\u7ea7\u662f\u4e0d\u4e00\u6837\u7684\uff0cLinux\u4e00\u5171\u67097\u4e2d\u8fd0\u884c\u7b49\u7ea7\uff08run level\uff09\uff0c\u5728\u4e0d\u540c\u7684\u8fd0\u884c\u7ea7\u4e0b\uff0c\u7cfb\u7edf\u6709\u7740\u4e0d\u540c\u7684\u72b6\u6001\uff0c\u5b83\u4eec\u5206\u522b\u662f\uff1a<\/p>\n

0\uff1a\u505c\u673a\uff08\u8bb0\u4f4f\u4e0d\u8981\u628ainitdefault \u8bbe\u7f6e\u4e3a0\uff0c\u56e0\u4e3a\u8fd9\u6837\u4f1a\u4f7fLinux\u65e0\u6cd5\u542f\u52a8 \uff09<\/p>\n

1\uff1a\u5355\u7528\u6237\u6a21\u5f0f\uff0c\u5c31\u50cfWin9X\u4e0b\u7684\u5b89\u5168\u6a21\u5f0f\u3002<\/p>\n

2\uff1a\u591a\u7528\u6237\uff0c\u4f46\u662f\u6ca1\u6709 NFS \u3002<\/p>\n

3\uff1a\u5b8c\u5168\u591a\u7528\u6237\u6a21\u5f0f\uff0c\u6807\u51c6\u7684\u8fd0\u884c\u7ea7\u3002<\/p>\n

4\uff1a\u4e00\u822c\u4e0d\u7528\uff0c\u5728\u4e00\u4e9b\u7279\u6b8a\u60c5\u51b5\u4e0b\u53ef\u4ee5\u7528\u5b83\u6765\u505a\u4e00\u4e9b\u4e8b\u60c5\u3002<\/p>\n

5\uff1aX11\uff0c\u5373\u8fdb\u5230 X-Window \u7cfb\u7edf\u3002<\/p>\n

6\uff1a\u91cd\u65b0\u542f\u52a8 \uff08\u8bb0\u4f4f\u4e0d\u8981\u628ainitdefault \u8bbe\u7f6e\u4e3a6\uff0c\u56e0\u4e3a\u8fd9\u6837\u4f1a\u4f7fLinux\u4e0d\u65ad\u5730\u91cd\u65b0\u542f\u52a8\uff09\u3002<\/p>\n

Terminal\u9ed8\u8ba4\u7684run level\u662f3\uff0c\u800cX Window\u9ed8\u8ba4\u7684run level\u662f5\uff0c\u73b0\u5728\u5982\u679c\u6211\u5728\u4e2d\u65ad\u8f93\u5165\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n

init 3<\/pre>\n

\u90a3\u4e48\u4f1a\u6740\u6b7bX Window\uff0c\u8fd9\u6837\u5c31\u6ca1\u6709X Window\u4e86\uff0c\u53ea\u5b58\u5728Terminal\uff0c\u6b64\u65f6\u5982\u679c\u6211\u60f3\u8981\u91cd\u65b0\u8fdb\u5165\u5230X Window\uff0c\u6211\u9700\u8981\u5728Terminal\u8fdb\u884c\u767b\u5f55\uff0c\u7136\u540e\u6267\u884c<\/p>\n

startx<\/pre>\n

\u91cd\u65b0\u6253\u5f00X Window\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

X Window\u4e0d\u662f\u67d0\u4e00\u4e2a\u5177\u4f53\u7684\u7a97\u4f53\u754c\u9762\uff0cX Window \u672c\u8d28\u662f\u4e00\u4e2a\u5206\u5c42\u7684\u67b6\u6784\uff0c\u5b83\u5206\u4e3a Server \u548c C […]<\/p>\n","protected":false},"author":310,"featured_media":204703,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-204696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/204696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=204696"}],"version-history":[{"count":9,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/204696\/revisions"}],"predecessor-version":[{"id":204751,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/204696\/revisions\/204751"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/204703"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=204696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=204696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=204696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}