Ubuntu dns: Difference between revisions
Jump to navigation
Jump to search
(Created page with " Edit the Netplan configuration file (usually located in /etc/netplan/). For example: sudo nano /etc/netplan/01-network-manager-all.yaml. To configure a static IP, modify the network: section with your desired IP address, gateway, and DNS servers. edit sudo nano /etc/netplan/01-network-manager-all.yaml Apply the changes: sudo netplan apply") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
Apply the changes: | Apply the changes: | ||
sudo netplan apply | sudo netplan apply | ||
can view your DNS On this file | |||
nano /etc/resolv.conf | |||
sudo nano /etc/systemd/resolved.conf | |||
# یا در صورت استفاده از resolvconf: | |||
echo -e “nameserver 178.22.122.100\nnameserver 185.51.200.2” | sudo tee /etc/resolv.conf |
Latest revision as of 07:31, 9 August 2025
Edit the Netplan configuration file (usually located in /etc/netplan/). For example: sudo nano /etc/netplan/01-network-manager-all.yaml.
To configure a static IP, modify the network: section with your desired IP address, gateway, and DNS servers.
edit
sudo nano /etc/netplan/01-network-manager-all.yaml
Apply the changes:
sudo netplan apply
can view your DNS On this file
nano /etc/resolv.conf
sudo nano /etc/systemd/resolved.conf
- یا در صورت استفاده از resolvconf:
echo -e “nameserver 178.22.122.100\nnameserver 185.51.200.2” | sudo tee /etc/resolv.conf