How to setup network from command line?

I have osmc with no kodi, and now I have to change static IP, netmask, default gateway, name servers…

I saw in /etc/dhcpcd.conf

interface eth0
static ip_address=
static routers=
static domain_name_servers=

which should cover static ip, router (gateway) and name servers, but I can’t see netmask which should be

Where is netmask config?
Am I editing the right file?

You can use connmanctl to configure the network via the command line.

I can’t find connmanctl.

root@backup:/usr/local/bin# which connmanctl

osmc@Vero4Ktesting:~$ which connmanctl

Sorry, this RPI is under Raspbian.
I appologize.

Best regards.

So I assume you figured you are on the wrong forum with your question

Use /etc/network/interfaces in raspbian.

1 Like

I know that I asked on the wrong forum. Sorry, again.
Thanks mcobit.