How to set/change ipaddress in linux terminal?

In order to set or change  the IP address assigned to a certain interface in your linux machine you can use GUI. Use System -> Administration ->Network. But it is not always possible to use GUI. Sometimes you need to use terminal commands (like if you are ssh'ing).
Login as root and use the following command:
#ifconfig eth0 11.11.1.178 netmask 255.255.248.0
where eth0 is the interface you want to configure
 11.11.1.178 is the ipaddress being assigned to that interface
 255.255.248.0 is the subnet mask

we can use system-config-network to configure DNS settings.

Comments

Popular posts from this blog

Curious case of MissingMethodInvocationException and Mockito.when

Building a Retrieval-Augmented Generation (RAG) Application with Ollama 3.2 and Spring Boot

Android aar deployment in Maven - 2022