Asian American Pacific Islander Month DDSD 2024.pptx
Red hat 3
1. OTHER USEFUL COMMAND OF UBUNTU SERVER
OTHER USEFUL COMMAND OF UBUNTU SERVER
Add new user
sudo adduser username
Enter password of current user
Enter new unix password for username
Retype new unix password for username
Remove a user
sudo userdel username
Enter password of current user
Change password of user
sudo passwd username
Enter new unix password for username
Retype new unix password for username
Enable root
sudo passwd root
Enter new unix password for root
Retype new unix password for root
Change user to root
su
Show network interface configuration
ifconfig
Show all network interface configuration
ifconfig –a
Down Ethernet
ifdown eth0
Up Ethernet
ifup eth0
Down and up ethernet
ifdown eth0 && ifup eth0
To stop networking service
sudo service networking stop or sudo /etc/init.d/networking stop
To start networking service
2. sudo service networking start or sudo /etc/init.d/networking start
To restart networking service
sudo service networking restart or sudo /etc/init.d/networking restart
To restart networking service for desktop
sudo service network-manager restart
Ip address for Ethernet eth0
sudo ifconfig eth0 XXX.XXX.XXX.XXX netmask XXX.XXX.XXX.XXX
Default gateway for Ethernet eth0
sudo route add default gw XXX.XXX.XXX.XXX eth0
DNS or Name server
nameserver XXX.XXX.XXX.XXX
nameserver XXX.XXX.XXX.XXX
Edit Ip address via editor
vi /etc/network/interfaces
Ethernet eth0 static to dhcpclient
sudo dhclient eth0
Disable IPv6 if not needed.
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl –p
ifconfig
To stop any service
sudo service stop servicename
sudo /etc/init.d/ servicename stop
To start any service
sudo service start servicename
sudo /etc/init.d/ servicename start
To restart any service
sudo service restart servicename
sudo /etc/init.d/ servicename restart
Add any service to startup
initctl start servicename
Remove any service from startup
initctl stop servicename
3. To see the list of the startup service
initctl list
To see the status of the startup service
initctl status servicename
Update your Ubuntu Server Using the Software Updater
sudo apt-get update && sudo apt-get dist-upgrade