To configure static IP address for wireless network on Ubuntu, follow these steps:
- Open the terminal by pressing Ctrl + Alt + T keys together.
- Type the following command to edit the interface configuration file:
sudo nano /etc/network/interfaces
- Within this file look for something similar to:
iface wlan0 inet dhcp
- Change these lines to the following:
iface wlan0 inet static
address 192.168.1.100 (or any desired static IP address)
gateway 192.168.1.1 (or your router's IP address)
- Press Ctrl + O to save the file, and Ctrl + X to close the editor.
- Restart the networking service using the following command:
sudo service networking restart
- To verify that the static IP address has been set successfully, run the following command:
ip addr show wlan0
This command will show details of the wireless adapter, including its IP address, netmask, and gateway. Your wireless adapter should now have a static IP address, and the changes made to the configuration file should persist across reboots.