هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
nmtui (NetworkManager text user interface) gives the same settings as nmcli, but with menus: use the arrow keys, Tab, Space and Enter.
It is a quick and safe way on the exam to set IP addresses, gateway and DNS. After editing a running connection, activate it again ("Activate a connection": deactivate and activate) so the new settings are used.
The package NetworkManager-tui may need to be installed.
طريقة الكتابة
nmtui [edit [CONNECTION] | connect [CONNECTION] | hostname [NAME]]
nmtui-edit [CONNECTION]
nmtui-connect [CONNECTION]
nmtui-hostname [NAME]الأجزاء الرئيسية
edit,nmtui-edit- Open the editor (for one connection or the list).
connect,nmtui-connect- Activate or deactivate connections.
hostname,nmtui-hostname- Set the host name.
الخيارات 2
الأكثر استخدامًا
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 10
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Open the main menu
nmtuiEdit a connection / Activate a connection / Set system hostname.
2Edit one connection directly
nmtui edit enp1s0Set IPv4 to Manual and add address, gateway and DNS.
3Re-activate after a change
nmtui connect enp1s0Or:
nmcli con up enp1s0. Without it the old settings stay active.4Set the host name
nmtui hostname server1.example.comSame as hostnamectl set-hostname.
5Install it when it is missing
dnf install -y NetworkManager-tuiPart of the RHEL BaseOS repo.
6Check the result with nmcli
nmtui writes the same keyfile that nmcli uses.
7Check the address after activation
ip -br addr show enp1s0 enp1s0 UP 192.168.122.10/24The new address is active.
8Work over SSH safely
nmtuiChanging the IP you are connected to ends your SSH session — use a console or plan it.
9Use it on a small terminal
TERM=xterm-256color nmtuiFixes broken drawing on some consoles.
10Find the keyfile it wrote
ls /etc/NetworkManager/system-connections/ enp1s0.nmconnectionSettings are saved here.
لا يوجد شيء يطابق هذا الفلتر.
انتبه
- Mark "Automatically connect" or the connection does not come up after a reboot.
- An address needs a prefix: 192.168.122.10/24, not only the IP.
الملفات
/etc/NetworkManager/system-connections/- The connection files.
رموز الخروج
0 | Done. |
1 | Error. |