Nmcli
lastmod 2026-02-23created 2022-08-1716 edits
Linux Network Manager
Categories
Install
Commands
The main nmcli command are broken down into several objects and subcommands.
- General
- Networking
- RTC (Radio Transmission Control)
- Activity Monitoring
- Connection Management
- Device Management
- Secret Agent
Checking device status
How to list Wi-fi networks
How to set DNS addresses manually
- Several methods are collected in Domain Name System#How to set DNS addresses manually.
# 현재 연결 이름 확인
nmcli connection show
# DNS 고정 설정 (연결 이름이 "Wired connection 1" 인 경우)
nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8 1.1.1.1"
nmcli connection modify "Wired connection 1" ipv4.ignore-auto-dns yes
# 적용
nmcli connection up "Wired connection 1"
How to set a static IP interactively
Check the existing connection name:
Enter interactive edit mode:
Configure in the interactive shell:
nmcli> set ipv4.method manual
nmcli> set ipv4.addresses 192.168.1.100/24
nmcli> set ipv4.gateway 192.168.1.1
nmcli> set ipv4.dns 8.8.8.8 8.8.4.4
nmcli> save
nmcli> activate
nmcli> print ipv4
nmcli> quit
| INFORMATION |
| Entering |
Verify the changes:
For reference, how to apply it all at once without interactive mode:
nmcli connection modify "연결이름" \
ipv4.method manual \
ipv4.addresses 192.168.1.100/24 \
ipv4.gateway 192.168.1.1 \
ipv4.dns "8.8.8.8 8.8.4.4"
nmcli connection up "연결이름"
Examples
| WARNING |
| These are answers from asking Claude. Needs verification |
# WiFi 활성화
nmcli radio wifi on
# 사용 가능한 WiFi 네트워크 스캔
nmcli device wifi list
# 또는 계속 새로고침하며 보기
nmcli device wifi list --rescan yes
# WiFi 연결
nmcli device wifi connect "SSID_이름" password "비밀번호"
# 저장된 연결 확인
nmcli connection show
# 특정 연결 활성화
nmcli connection up "연결이름"
# 텍스트 기반 UI 실행
nmtui
# 또는 직접 WiFi 연결 메뉴로
nmtui-connect
# 현재 WiFi 상태 확인
nmcli device status
# WiFi 연결 해제
nmcli device disconnect wlan0
# 저장된 연결 삭제
nmcli connection delete "연결이름"
# WiFi 장치 이름 확인
ip link show
# 또는
iwconfig
# 숨겨진 네트워크 연결
nmcli device wifi connect "SSID_이름" password "비밀번호" hidden yes
See also
- ip (linux command)
- netplan - To set a static IP on Ubuntu, see Netplan#How to set a static IP.
- Linux:Network