interface command to change ip in linux

0

Hello, good afternoon everyone, I want to clarify that it is not that I do not know how to change the ip of my linux. what I mean is that if I know I can do it from the command

nano etc/network/interfaces

and I know I can also do it from the command

ifconfig  eth0 192.168.1.10 netmask 255.255.255.0 up

rather I would like someone to remind me what is the command that opens a small graphical interface from the same linux console, for a greater reference I remember that the interface is blue and you can navigate in it with the arrow keys of your keyboard I hope someone helps me remember the command. thank you very much.

    
asked by Valdemar Allan Poe 07.10.2018 в 01:19
source

2 answers

1

Maybe you mean nmtui.

It is a graphical console interface for NetworkManager.

    
answered by 12.10.2018 / 22:46
source
0

To configure static IP in Linux by default we must modify the file located in / etc / network / interfaces , but first I recommend you scan your network interfaces with the command:

ifconfig

With this command you will get the interface that you are using for internet, for example eth0 and be able to modify it. Then you can go to edit the file / etc / network / interfaces with the following command:

sudo nano /etc/network/interfaces

or if I want to edit it graphically (for example with gedit):

gedit /etc/network/interfaces

For the chosen interface (in this case eth0) I use this configuration:

allow-hotplug eth0

auto eth0
iface eth0 inet static
address 192.168.1.100
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

In address place the IP you want to configure statically and in the gateway of your router, usually 192.168.1.1 . This depends on the router and we can check it with ifconfig.

Then you restart the service:

/etc/init.d/networking restart

And ready!.

I hope it's what you're looking for.

    
answered by 07.10.2018 в 16:53