Create a group:
sudo groupadd mygroup
Add user to group:
usermod -a -G mygroup user
Command | Description |
---|---|
ls /sys/class/net/ |
List network interfaces |
ip link show |
List network interfaces |
ip address show |
Show ip address |
hostname -I |
Show IP associated with hostname. |
ip -c -br addr |
Lists all interfaces and their IP addresses. |
ip a s dev enp0s1 |
Show IP of a given device. In this example the divice is enp0s1 . |
hostname |
Show machine hostname. |
ip link set <device> down ip link set <device> up |
Turn device on or off. |
cat ~/.ssh/id_rsa.pub | ssh [email protected] "cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"