0% found this document useful (0 votes)
158 views1 page

Ubuntu Commands

The document outlines a series of Linux command-line instructions for user management, package installation, network configuration, and service management. It includes commands for adding a user, installing software like Open VM Tools and OpenSSH, configuring static IP settings, and managing SSH keys. Additionally, it covers system shutdown commands and package removal for services like Nginx and MySQL.

Uploaded by

Gaurav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views1 page

Ubuntu Commands

The document outlines a series of Linux command-line instructions for user management, package installation, network configuration, and service management. It includes commands for adding a user, installing software like Open VM Tools and OpenSSH, configuring static IP settings, and managing SSH keys. Additionally, it covers system shutdown commands and package removal for services like Nginx and MySQL.

Uploaded by

Gaurav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

• Adduser devops

• usermod -aG sudo devops


• Su devops
• whoami
• su gaurav
• cd ~
• Sudo apt-get install open-vm-tools
• Sudo apt-get install openssh-server
• hostnamectl
• hostnamectl set-hostname newhostname
• /etc/hosts - local hosts file
• nmcli device show ens33- DNS, default gatewy
• vi /etc/[Link]- nameserver [Link]
• /etc/netplan/99_config.yaml - Setup Static IP for server
• sudo netplan apply
• brctl show
• ssh-keygen
• ssh-copy-id username@remote_host
• Remove ssh key -ssh-keygen -f "/home/gaurav/.ssh/known_hosts" -R "app1"
• apt-get install iputils-ping
• Apt-get install openssh-server
• sudo apt install sudo
• init 0 - shutdown
• shutdown now
• sudo shutdown 15:30
• sudo shutdown -r now
• Ufw app list
• Ufw status
• route -n
• sudo ip route show
• sudo apt-get remove nginx
• sudo apt-get remove --auto-remove nginx
• sudo apt-get remove --purge mysql*
• sudo apt-get purge mysql*
• sudo apt-get autoremove
• sudo apt-get autoclean
• sudo apt-get remove dbconfig-mysql
• dpkg -l | grep nginx, dpkg --get-selections | grep mysql
• ps aux | grep sshd
• systemctl status nginx
• systemctl start, stop, restart
• service <service-name> start, stop, restart
• sudo apt-get autoremove
• Tree - recursive directory listing program
• cat ~/.ssh/id_rsa.pub
• ls -lah ~/.ssh#

You might also like