ls -1 /sys/class/netChange IP/Subnet temporary:
sudo ifconfig eth0 192.168.0.23 netmask 255.255.255.0Change default gateway:
sudo route add default gw 192.168.0.1 eth0Verify gateway
ip route | grep defaultChange DNS
sudo nano /etc/resolv.conf
then add DNS IPs in this file.Change IP persistently:
sudo nano /etc/network/interfaces
auto eth0 iface eth0 inet static address 192.168.1.12 netmask 255.255.255.0 gateway 192.168.1.0
Get network hardware
sudo find /sys -name *eth*
lspci | grep -i eth* (get brand name)Change the host name
sodu nano /etc/hosts
sodu nano /etc/hostname
then enter the expected name
More ...
Reset root password on Ubuntu
Reset root password on Ubuntu
- Boot to recovery mode (Hold Ecs or Shift key to show the GRUB, choose Advance -> Recovery Mode)
- Mount file-system with write permission: mount -rw -o remount /
- Type command: passwd username
- Reboot
- Login root in recovery mode (above)
- Edit /etc/sudoers to add user has sudo privilege
- Add a line: user ALL=(ALL) ALL
0 Comments