Monitor and manage the processes:
df: report the filesystem disk space usage.
df -h output format: filesystem: size: used: available: use %: mounted on
du: estimate the file space usage.
du/: list all the files present in the/with its size.
du-k/ list the files in/and its size in kb
du-k/1sort-ar | more: lists the files inside the / with its size in KB sorts the output with highest size on the top and lists the output one page at a time.
du-h | sort-ar | more: lists the files inside the / with its size in human readable format sorts the output
with highest size on the top and lists the output one page at a time.
df-hT: lists the filesystem and shows the filesystem type and gives the size in human readable format.
uptime: tells you how long the system is running.
top: display the linux processes.
free: this command gives the information about your memory.
free-m: gives the memory size in megabyte.
Isof: list open files.
tcpdump: It is used to capture, filter, and analyze network traffic such as TCP/IP packets going through your system.
tcpdump -i enpos3: shows the network traffic coming in and out of the interface enpos3.
netstat: "netstat stands for network statistics. It allows users to display network-related information and diagnose various networking issues.
netstat -a more shows both listening and non listening sockets.
netstat -at: This command specifically lists all TCP ports, giving you information about the TCP connections your system is engaged in.
netstat-au: this command focuses on UDP ports, revealing details about UDP connections.
netstat -1: list only the listening ports.
netstat -It: list only the listening top ports.
netstat-lu: list only the listening udp ports.
netstats: list the statistics for all the ports
netstat-st: displays statistics exclusively for TCP ports.
netstat-su: statistical information related to UDP ports.
netstat-pt: displaying Process ID (PID) and program names associated with network connections.
netstat -r: command retrieves kernel routing information, displaying destination addresses, gateways, and interface details.
netstat -ap | grep ssh To find the port on which a specific program, in this case, SSH, is running, use this command.
netstat -i to obtain a list of network interfaces
netstat -ie: For extended information on interfaces.
ps-A: list all the running processes in linux
ps-a: View all processes except both session leaders and processes not associated with a terminal.
ps-T: List All Processes Associated with this Terminal in Linux
ps-e: Print all the processes within the system.
ps-e-f: list of all the processes running on your Linux systent in a more detailed format
ps-C systemd list of all the processes running on your Linux system that are related to the systemd process management system.
ps-u root: display information about all processes on the system that are owned by the root user.
ps -ef | more : list all the processes in the linux system and shows the output one page at a time .
kill psid : kills the process whose process id is psid.
kill -9 psid : kills the process harshly whose process id is psid.
Comments
Post a Comment