5 Basic Ubuntu Server Management
Upon completing the installation of Ubuntu Server 22, you won’t be greeted with a graphical user interface but with a terminal prompt. Here’s how to proceed:
Log In to Your Server: Use the username and password you defined during the installation process on the device itself.
Update and Upgrade Your System: First and foremost, ensure your server is updated. Execute:
sudo apt update
sudo apt upgrade -y
- Installing Necessary Network Tools: To view your network configuration using
ifconfig, install thenet-toolspackage:
sudo apt install net-tools -y
- Determine Your Server’s IP Address:
- Using
ifconfig:
ifconfig
ubuntu@ip-172-31-45-224:~/ec2manager$ ifconfig
... # redacted
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.152 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::af05:f519:6f0c:eb5c prefixlen 64 scopeid 0x20<link>
ether c8:5e:a9:4f:8d:f5 txqueuelen 1000 (Ethernet)
RX packets 1782304 bytes 1440108004 (1.4 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1271509 bytes 743472742 (743.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
... # redacted
Scan for entries like eth0 (for wired connections) or wlan0 (wireless). The inet value in these entries is your IP address.
- Note on Network Interface Names: Some newer installations might use names like
enp0s3orenp2s0. These are predictable network interface names. Regardless of the naming, the process to find the IP remains consistent.
- Understanding Local IP Addresses:
Local networks often use IPs starting with 192.168. If you spot an IP starting with this in ifconfig, that’s your server’s local IP, used for communication within the same network.
Installing the OpenSSH Client on Ubuntu:
sudo apt install openssh-client -y
Connecting to Your Server Remotely: Use:
ssh username@server_ip_address
Swap out username with your server’s username and server_ip_address with the earlier identified IP.
Note: For the initial connection, you’ll be asked to authenticate the host. Type yes and then input the server password when prompted.