الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

chvt

Switch the screen of the machine to another virtual terminal (tty1 … tty12).

المستوى
لينكس اليومي
المجموعة
الطرفية والمساعدة
يحتاج root
نعم
الحزمة
kbd

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

chvt N makes /dev/ttyN the active console, like pressing Ctrl+Alt+FN. It is useful when you work on a machine through a remote tool that cannot send Ctrl+Alt key combinations, or from a script.

You must be root (or own the console) to switch.

طريقة الكتابة

chvt [OPTION] N

الخيارات 3

الأكثر استخدامًا

N
The number of the virtual terminal (1 to 12, or more).
-h, --help
Show help.
-V, --version
Show the version.

أمثلة 10

$ مستخدم عادي# بصلاحية root (أو مع sudo)

  1. 1Go to the third text console

    chvt 3

    Same as Ctrl+Alt+F3.

  2. 2Go back to the graphical login screen

    chvt 1

    On RHEL with a desktop, tty1 is the login screen.

  3. 3Switch to your graphical session

    chvt 2

    On RHEL your desktop session usually runs on tty2.

  4. 4Use it over SSH to show a console to a colleague

    chvt 4

    The physical screen in the server room changes.

  5. 5See which terminal is active

    cat /sys/class/tty/tty0/active
    tty2

    Shows the active virtual terminal.

  6. 6Switch when the remote console cannot send Ctrl+Alt+F keys

    chvt 3

    Many web consoles of virtual machines catch these keys.

  7. 7Free a virtual terminal that is not used

    deallocvt 7

    Removes unused consoles from memory.

  8. 8Open a login on another console from a script

    openvt -c 5 -- /bin/login

    Starts a login program on tty5.

  9. 9Check which consoles have a login prompt

    systemctl list-units 'getty@*'

    Each text console with a login prompt is a getty service.

  10. 10Switch back after maintenance

    chvt 1

    Leave the screen at the login prompt.

انتبه

  • chvt changes the physical screen. Users on the console notice it.

نصائح للحفظ

  • chvt N = Ctrl+Alt+FN from the command line.

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man chvt