-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
date created: Saturday, January 11th 2025, 9:26:35 am | ||
date modified: Saturday, January 11th 2025, 9:34:42 am | ||
tags: | ||
--- | ||
|
||
# nmcli, networkmanager | ||
|
||
NetworkManager - network management daemon | ||
|
||
## restart NetworkManager | ||
|
||
it's NetworkManager, not networkmanager :) | ||
|
||
```shell | ||
systemctl restart NetworkManager.service | ||
``` | ||
|
||
## get general network overview | ||
|
||
```shell | ||
nmcli | ||
``` | ||
|
||
## get list of network devices and status | ||
|
||
```shell | ||
nmcli device status | ||
``` | ||
|
||
## get information about networkmanager connections | ||
|
||
```shell | ||
nmcli con | ||
``` | ||
|
||
## change dns resolver with NetworkManager | ||
|
||
instead of editing `/etc/resolv.conf`, do the following (with `nmcli con` you get the connection name.): | ||
|
||
```shell | ||
nmcli con mod "Wired connection 1" ipv4.dns "127.0.0.1" | ||
nmcli con mod "Wired connection 1" ipv6.dns "::1" | ||
``` | ||
|
||
### disable DHCP provided dns | ||
|
||
if you execute the above, you'll still have the DNS servers provided by the DHCP server available as well, do disable this behavior: | ||
|
||
```shell | ||
nmcli con mod "Wired connection 1" ipv4.ignore-auto-dns yes | ||
nmcli con mod "Wired connection 1" ipv6.ignore-auto-dns yes | ||
``` |