Categories
Debian 10 Servers

Debian 10 begins

Press enter to boot our system
Login with your username & password.

Creating new user

#useradd -m -G sudo username 
#passwd username

just create paswword for your new sudo account

Ethernet interface configuration

List available interfaces

user $ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:22:68:13:da:7d brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:1e:65:6b:ef:ca brd ff:ff:ff:ff:ff:ff

Show IP address

user $ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:22:68:13:da:7d brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:1e:65:6b:ef:ca brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.10/24 brd 192.0.2.255 scope global wlan0
       valid_lft forever preferred_lft forever

Activate eth0 interface

root #ip link set eth0 up

Configure IP address on interface

Using IPv4 protocol:

  • Add IP address to eth0 interface

root #ip addr add 192.0.2.11/24 dev eth0

  • Remove IP address from wlan0 interface

root #ip addr del 192.0.2.10/24 dev wlan0

Using IPv6 protocol:

  • Add IPv6 address to wlan0 interface

root #ip -6 addr add 2001:db8::10/64 dev wlan0

  • Remove IPv6 address from eth0 interface

root #ip -6 addr del 2001:db8::11/64 dev eth0

Add default route

Using IPv4 protocol:root #ip route add default via 192.0.2.1

Using IPv6 protocol:root #ip -6 route add default via fe80::1

Show IP routing table

Show IP routing table:user $ip route show

default via 192.0.2.1 dev eth0  metric 2 
127.0.0.0/8 via 127.0.0.1 dev lo 
192.0.2.0/24 dev eth0  proto kernel  scope link  src 192.0.2.11

Show IPv6 routing table:user $ip -6 route show

2001:db8::10/64 dev wlan0  proto kernel  metric 2003  mtu 1492
fe80::/64 dev wlan0  proto kernel  metric 256  pref medium
ff00::/8 dev wlan0  metric 256 
default via fe80::1 dev wlan0  metric 2003  mtu 1492
$ ping google.com
makesure your internet working perfectly. 😊

Leave a Reply

Your email address will not be published. Required fields are marked *