Last active
February 17, 2025 21:38
-
-
Save Vaneeza-7/69c875b77ce4f9d88950c3aac0c8b1e7 to your computer and use it in GitHub Desktop.
Configure IP address on Ubuntu
This file contains hidden or 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
#!/bin/bash | |
clear | |
setIP(){ | |
ip addr show | |
sudo gedit /etc/network/interfaces #edit dns maskgateway and ip here, (ipconfig functionality) | |
sudo netplan try #configure IP | |
sudo netplan apply | |
ip a #check if ip has changed or not | |
} | |
#call the function here | |
setIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment