To check the status of a Linux server, you can use various commands and tools. Here are some common ones:
- Uptime:
- Use the command
uptimein the terminal. - It displays how long the system has been running, the number of users, and the load average.
- Top:
- Use the command
topin the terminal. - It provides real-time information about system resource usage, including CPU, memory, and processes.
- Free:
- Use the command
freein the terminal. - It displays information about total, used, and free memory and swap space.
- Vmstat:
- Use the command
vmstatin the terminal. - It provides information about system memory, processes, and CPU usage.
- Iostat:
- Use the command
iostatin the terminal. - It provides information about CPU, disk, and input/output statistics.
- Netstat:
- Use the command
netstatin the terminal. - It displays network connections, routing tables, and more.
- Htop:
- If installed, you can use the
htopcommand in the terminal. - It is an interactive process viewer that provides a more user-friendly interface compared to
top.
- Systemctl:
- Use the
systemctlcommand to manage services. - For example,
systemctl status <service_name>will show the status of a specific service.
- Journalctl:
- Use the
journalctlcommand to view system logs. - For example,
journalctl -xewill show recent system logs.
- Df:
- Use the command
dfin the terminal. - It displays information about disk space usage.
- Use the command
- Ifconfig / Ip:
- Use
ifconfigoripto view network interface information. - For example,
ifconfigorip addr showwill display details about network interfaces.
- Use
- Ping:
- Use the
pingcommand to check network connectivity to a specific host. - For example,
ping google.comwill check the connectivity to Google’s servers.
- Use the
Remember, some of these commands may require administrative privileges or may need to be run with sudo depending on your system configuration. Always exercise caution when using commands that can affect system settings or services.
