Linux commands that are frequently used by middleware administrators
top: This command shows you the processes that are currently running on your system, along with their resource usage, such as CPU and memory usage.
ps: This command is used to display information about the active processes on your system, including their process ID (PID), status, and resource usage.
netstat: This command is used to display information about active network connections and open ports on your system.
df: This command displays the amount of free and used disk space on your system's file systems.
grep: This command is used to search for a specific pattern or text string in a file or output.
tail: This command is used to display the last few lines of a file or output.
less: This command allows you to view and scroll through the contents of a file, similar to the "more" command, but with more advanced features.
find: This command is used to search for files or directories on your system based on various criteria, such as name, size, or modification date.
chmod: This command is used to change the permissions of files and directories on your system, allowing you to control who can access or modify them.
tar: This command is used to create and manipulate archive files, such as .tar or .zip files, allowing you to compress and decompress files and directories for easier storage and transfer.
Here are some additional Linux commands that can be useful for middleware admins, along with examples:
lsof: This command is used to list open files and processes on your system. You can use it to find which processes are using a particular file, socket or port.
Example: lsof -i :8080 will list all processes using port 8080.
ss: This command is used to display socket statistics. It can be used to list all TCP and UDP connections on your system.
Example: ss -tulwn will display all TCP and UDP connections on your system.
awk: This command is a powerful text-processing tool that allows you to manipulate and filter data in text files.
Example: awk '{print $1}' /etc/passwd will print the first field (username) in the /etc/passwd file.
sed: This command is used for stream editing of text files. It can be used to perform various operations on text data, such as search and replace.
Example: sed 's/old_text/new_text/g' file.txt will replace all instances of "old_text" with "new_text" in the file.txt.
curl: This command is used to transfer data from or to a server using various protocols, such as HTTP, FTP, and SMTP.
Example: curl https://example.com will download the contents of the webpage at https://example.com.
wget: This command is used to download files from the internet.
Example: wget https://example.com/file.zip will download the file.zip from the example.com website.
rsync: This command is used to synchronize files and directories between different systems.
Example: rsync -avz /local/dir user@remote:/remote/dir will synchronize the /local/dir directory to the remote system at /remote/dir using the SSH protocol.
tar: This command is used to create and manipulate archive files, such as .tar or .zip files, allowing you to compress and decompress files and directories for easier storage and transfer.
Example: tar -cvzf archive.tar.gz /path/to/dir will create a compressed tar archive of the /path/to/dir directory named archive.tar.gz.
I hope these additional examples are helpful!
ifconfig: This command displays network interface configuration information, such as IP addresses, netmasks, and network interfaces status.
Example: ifconfig eth0 will display information about the eth0 network interface.
ip: This command is used to display and manipulate network interfaces, addresses, and routing tables.
Example: ip route show will display the current routing table.
route: This command is used to display and manipulate the kernel's IP routing table.
Example: route -n will display the routing table in a numeric format.
traceroute: This command is used to trace the route that packets take from your computer to a specified host.
Example: traceroute google.com will display the route that packets take to reach google.com.
ping: This command is used to test connectivity between two hosts.
Example: ping google.com will send ICMP echo requests to google.com to test connectivity.
nc: This command is used to establish TCP/UDP connections and send/receive data.
Example: nc -vz google.com 80 will check if port 80 on google.com is open.
tcpdump: This command is used to capture network traffic and analyze it in real-time.
Example: tcpdump -i eth0 port 80 will capture network traffic on port 80 of the eth0 network interface.
iptables: This command is used to manipulate and configure firewall rules on Linux systems.
Example: iptables -L will display the current firewall rules.
ssh: This command is used to establish a secure shell (SSH) connection to a remote host.
Example: ssh user@remotehost will establish an SSH connection to remotehost as the user user.
scp: This command is used to securely copy files between hosts.
Example: scp file.txt user@remotehost:/path/to/destination will copy file.txt to the remote host at /path/to/destination.
tail: This command is used to display the last few lines of a file.
Example: tail -f /var/log/messages will display the last 10 lines of the /var/log/messages file and follow it as it changes.
grep: This command is used to search for a specified pattern in a file or input.
Example: grep "error" /var/log/messages will search for the string "error" in the /var/log/messages file.
awk: This command is used for text processing and manipulation.
Example: awk '{print $1}' /etc/passwd will print the first field (username) in the /etc/passwd file.
sed: This command is used for stream editing of text files.
Example: sed 's/old_text/new_text/g' file.txt will replace all instances of "old_text" with "new_text" in the file.txt.
cut: This command is used to extract specific fields or columns from a file.
Example: cut -d ":" -f 1 /etc/passwd will display the first field (username) from the /etc/passwd file, using ":" as the delimiter.
find: This command is used to search for files and directories on a file system.
Example: find /var/log -type f -name "*.log" will search for all files with the .log extension in the /var/log directory.
du: This command is used to display disk usage information for files and directories.
Example
df: This command is used to display the amount of free and used disk space on a file system.
Example: df -h will display disk usage information in a human-readable format.
top: This command is used to display real-time information about system processes and their resource usage.
Example: top -u username will display system processes that are being run by the user username.
htop: This command is similar to top, but provides more features and a user-friendly interface.
Example: htop will display the same information as top, but with a more user-friendly interface.
ps: This command is used to display information about running processes on the system.
Example: ps -ef | grep java will display all Java processes that are currently running on the system.
kill: This command is used to terminate a running process.
Example: kill PID will terminate the process with the specified PID.
nohup: This command is used to run a command that will continue to run even after the user logs out.
Example: nohup command & will run the specified command in the background and continue to run even after the user logs out.
crontab: This command is used to create and manage scheduled tasks, known as cron jobs.
Example: crontab -e will open the user's crontab file for editing.
systemctl: This command is used to control system services.
Example: systemctl start service will start the specified system service.
journalctl: This command is used to view system logs.
Example: journalctl -u service will display logs for the specified system service.
lsblk: This command is used to list information about available block devices.
Example: lsblk will display information about all available block devices on the system.
mount: This command is used to mount a file system.
Example: mount /dev/sda1 /mnt will mount the file system located on /dev/sda1 to the /mnt directory.
umount: This command is used to unmount a file system.
Example: umount /mnt will unmount the file system that is currently mounted at the /mnt directory.
free: This command is used to display system memory usage.
Example: free -m will display system memory usage
Comments
Post a Comment