Home > Article > Operation and Maintenance > Summary of commonly used linux commands
I have been dealing with Linux recently and I feel pretty good. I think the troublesome thing about Linux compared to Windows is that many things need to be controlled by commands. Of course, this is also the reason why many people like Linux. It is relatively short but powerful. I will list the commands I know for your reference only:
System Information
arch Display the processor architecture of the machine (1)
uname -m Display the processor architecture of the machine (2 )
uname -r displays the kernel version in use
dmidecode -q displays hardware system components - (SMBIOS / DMI)
hdparm -i /dev/hda lists the architectural features of a disk
hdparm - tT /dev/sda Perform a test read operation on the disk
cat /proc/cpuinfo Display CPU info information
cat /proc/interrupts Display interrupts
cat /proc/meminfo Verify memory usage
cat /proc/swaps displays which swaps are used
cat /proc/version displays the kernel version
cat /proc/net/dev displays the network adapter and statistics
cat /proc/mounts displays loaded File system
lspci -tv List PCI devices
lsusb -tv Display USB devices
date Display system date
cal 2007 Display calendar for 2007
date 041217002007.00 Set date and time - month Day, hour, minute, year, second
clock -w Save time modification to BIOS
Shutdown (system shutdown, restart and logout)
shutdown -h now Shut down the system (1)
init 0 Shut down the system (2)
telinit 0 Shut down the system (3)
shutdown -h hours:minutes & Shut down the system at scheduled time
shutdown -c Cancel the system shutdown at the scheduled time
shutdown -r now Restart (1)
reboot Restart (2)
logout Logout
Files and Directories
cd /home Enter the '/ home' directory'
cd .. Return to the upper directory
cd ../.. Return to the two levels above
cd Enter the personal home directory
cd ~user1 Enter the personal home directory
cd - Return to the last directory
pwd Display the working path
ls View the files in the directory
ls -F View files in the directory
ls -l Display details of files and directories
ls -a Display hidden files
ls *[0-9]* Display file names and directory names containing numbers
tree Displays the tree structure of files and directories starting from the root directory (1)
lstree Displays the tree structure of files and directories starting from the root directory (2)
mkdir dir1 Creates a directory called 'dir1' '
mkdir dir1 dir2 Create two directories at the same time
mkdir -p /tmp/dir1/dir2 Create a directory tree
rm -f file1 Delete a file called 'file1'
rmdir dir1 Delete A directory called 'dir1'
rm -rf dir1 Delete a directory called 'dir1' and delete its contents at the same time
rm -rf dir1 dir2 Delete two directories and their contents at the same time
mv dir1 new_dir Rename/move a directory
cp file1 file2 Copy a file
cp dir/* . Copy all files in a directory to the current working directory
cp -a /tmp/dir1 . Copy a directory to Current working directory
cp -a dir1 dir2 Copy a directory
ln -s file1 lnk1 Create a soft link pointing to a file or directory
ln file1 lnk1 Create a physical link pointing to a file or directory
touch -t 0712250000 file1 Modifies the timestamp of a file or directory - (YYMMDDhhmm)
file file1 outputs the mime type of the file as text
iconv -l Lists known encodings
iconv -f fromEncoding - t toEncoding inputFile > outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.
find . -maxdepth 1 -name *.jpg -print -exec convert "{}" - resize 80x60 "thumbs/{}" \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)
File search
find / -name file1 Enter the root file system starting from '/' to search for files and directories
find / -user user1 Search for files and directories belonging to user 'user1'
find / home/user1 -name \*.bin Search for files ending with '.bin' in the directory '/ home/user1'
find /usr/bin -type f -atime 100 Search has not been used in the past 100 days Executable files
find /usr/bin -type f -mtime -10 Search for files that were created or modified within 10 days
find / -name \*.rpm -exec chmod 755 '{}' \ ; Search for files ending with '.rpm' and define their permissions
find / -xdev -name \*.rpm Search for files ending with '.rpm', ignoring removable devices such as CD-ROM drives and USB drives
locate \*.ps Find files ending with '.ps' - run the 'updatedb' command first
whereis halt displays the location of a binary file, source code or man
which halt displays the complete location of a binary file or executable file Path
Mount a file system
mount /dev/hda2 /mnt/hda2 Mount a disk called hda2 - Make sure the directory '/mnt/hda2' already exists
umount /dev/hda2 Unmount a disk called hda2 - Exit from the mount point '/mnt/hda2' first
fuser -km /mnt/hda2 Force unmount when the device is busy
umount -n /mnt/hda2 Run an unmount operation without writing to the /etc/mtab file - useful when the file is read-only or when the disk is full
mount /dev/fd0 /mnt/floppy Mount a floppy disk
mount /dev/cdrom /mnt/cdrom Mount a cdrom or dvdrom
mount /dev/hdc /mnt/cdrecorder Mount a cdrw or dvdrom
mount /dev/hdb /mnt/cdrecorder Mount a cdrw or dvdrom
mount -o loop file.iso /mnt/cdrom Mount a file or ISO image file
mount -t vfat /dev/hda5 /mnt/hda5 Mount a Windows FAT32 file system
mount /dev/sda1 /mnt /usbdisk mounts a usb disk or flash memory device
mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mounts a windows network share
Disk space
df -h displays the mounted partition list
ls -lSr |more Arrange files and directories by size
du -sh dir1 estimates the used disk space of directory 'dir1' '
du -sk * | sort -rn displays the size of files and directories in sequence based on capacity
rpm -q -a --qf ' {SIZE}t%{NAME}n' | sort -k1,1n Display the space used by installed rpm packages in order based on size (fedora, redhat type systems)
dpkg-query -W -f=' ${Installed-Size;10}t${Package}n' | sort -k1,1n displays the space used by installed deb packages based on size (ubuntu, debian system)
Users and groups
groupadd group_name Create a new user group
groupdel group_name Delete a user group
groupmod -n new_group_name old_group_name Rename one User group
useradd -c "Name Surname " -g admin -d /home/user1 -s /bin/bash user1 Create a user belonging to the "admin" user group
useradd user1 Create a new user
userdel -r user1 Delete a user ('-r' excludes the home directory)
usermod -c "User FTP" -g system -d /ftp/user1 -s /bin/nologin user1 Modify user attributes
passwd Modify Password
passwd user1 Modify the password of a user (only allowed to be executed by root)
chage -E 2005-12-31 user1 Set the expiration date of the user password
pwck Check the file format and Syntax correction and existing users
grpck Check the file format and syntax correction of '/etc/passwd' and existing groups
newgrp group_name Log into a new group to change the default group for newly created files
File permissions - use " " to set permissions, use "-" to cancel
ls -lh display permissions
ls /tmp | pr -T5 -W$COLUMNS Divide the terminal into 5 columns for display
chmod ugo rwx directory1 Set the owner (u), group (g) and others (o) of the directory to read ( r ), write (w) and execute (x) permissions
chmod go-rwx directory1 Delete the read, write and execute permissions of the group (g) and others (o) on the directory
chown user1 file1 Change a file Owner attribute
chown -R user1 directory1 Change the owner attribute of a directory and change the attributes of all files in the directory at the same time
chgrp group1 file1 Change the group of the file
chown user1:group1 file1 Change a File owner and group attributes
find / -perm -u s Lists all files in a system that use SUID control
chmod u s /bin/file1 Sets the SUID bit of a binary file - the user running the file Also given the same permissions as the owner
chmod u-s /bin/file1 disables the SUID bit of a binary file
chmod g s /home/public sets the SGID bit of a directory - similar to SUID, but for directories
chmod g-s /home/public Disable the SGID bit of a directory
chmod o t /home/public Set the STIKY bit of a file - only allow legitimate owners to delete files
chmod o-t /home/public Disable a directory The STIKY bit
Special attributes of the file - use " " to set permissions, use "-" to cancel
chattr a file1 only allows the file to be read and written in append mode
chattr c file1 allows this file to be automatically compressed/decompressed by the kernel
chattr d file1 When performing a file system backup, the dump program will ignore this file
chattr i file1 Set to be an immutable file that cannot be deleted, modified, renamed or linked
chattr s file1 allows a file to be safely deleted
chattr S file1 Once the application performs a write operation on this file, the system will immediately write the modified results to the disk
chattr u file1 If the file is deleted, the system will allow you to restore the deleted file later
lsattr displays special attributes
Packaging and compressing files
bunzip2 file1.bz2 Unzip a file called 'file1.bz2'
bzip2 file1 Compresses a file called 'file1'
gunzip file1.gz Decompresses a file called 'file1.gz'
gzip file1 Compresses a file called 'file1'
gzip -9 file1 Maximum compression
rar a file1.rar test_file Create a package called 'file1.rar'
rar a file1.rar file1 file2 dir1 Compress 'file1', 'file2' and directory 'dir1' at the same time
rar x file1.rar Decompress rar package
unrar x file1.rar Decompress rar package
tar -cvf archive.tar file1 Create a non-compressed tarball
tar -cvf archive.tar file1 file2 dir1 Create a file containing Archive files of 'file1', 'file2' and 'dir1'
tar -tf archive.tar Display the contents of a package
tar -xvf archive.tar Release a package
tar -xvf archive. tar -C /tmp Release the compressed package to the /tmp directory
tar -cvfj archive.tar.bz2 dir1 Create a compressed package in bzip2 format
tar -jxvf archive.tar.bz2 Decompress a compressed package in bzip2 format Package
tar -cvfz archive.tar.gz dir1 Create a compressed package in gzip format
tar -zxvf archive.tar.gz Decompress a compressed package in gzip format
zip file1.zip file1 Create a compressed package in zip format Compressed package
zip -r file1.zip file1 file2 dir1 Compress several files and directories into a compressed package in zip format at the same time
unzip file1.zip Decompress a compressed package in zip format
RPM package - (Fedora, Redhat and similar systems)
rpm -ivh package.rpm Install an rpm package
rpm -ivh --nodeeps package.rpm Install an rpm package and ignore dependency warnings
rpm -U package.rpm Update an rpm package without changing its configuration file
rpm -F package.rpm Update an rpm package that is sure to be installed
rpm -e package_name.rpm Delete an rpm package
rpm -qa Display all installed rpm packages in the system
rpm -qa | grep httpd Display all rpm packages whose names contain the word "httpd"
rpm -qi package_name Get special information of an installed package
rpm -qg "System Environment/Daemons" Display the rpm package of a component
rpm -ql package_name Display the file list provided by an installed rpm package
rpm -qc package_name Displays a list of configuration files provided by an installed rpm package
rpm -q package_name --whatrequires Displays a list of dependencies with an rpm package
rpm -q package_name --whatprovides Displays an rpm The volume occupied by the package
rpm -q package_name --scripts Displays the scripts executed during installation/removal
rpm -q package_name --changelog Displays the modification history of an rpm package
rpm -qf / etc/httpd/conf/httpd.conf Confirm which rpm package the given file is provided by
rpm -qp package.rpm -l Display the file list provided by an rpm package that has not been installed
rpm --import /media/cdrom/RPM-GPG-KEY Import the public key digital certificate
rpm --checksig package.rpm Confirm the integrity of an rpm package
rpm -qa gpg-pubkey Confirm the integrity of all installed rpm packages Properties
rpm -V package_name Check file size, permission, type, owner, group, MD5 check and last modified time
rpm -Va Check all installed rpm packages on the system - use with caution
rpm -Vp package.rpm Confirm that an rpm package has not been installed
rpm2cpio package.rpm | cpio --extract --make-directories *bin* Run the executable file from an rpm package
rpm -ivh /usr/src /redhat/RPMS/`arch`/package.rpm Install a built package from an rpm source code
rpmbuild --rebuild package_name.src.rpm Build a rpm package from an rpm source code
YUM software package upgrader - (Fedora, RedHat and similar systems)
yum install package_name Download and install an rpm package
yum localinstall package_name.rpm Will install an rpm package and use your own software repository to resolve all dependencies for you
yum update package_name.rpm Update all installed rpm packages in the current system
yum update package_name Update an rpm package
yum remove package_name deletes an rpm package
yum list lists all packages installed in the current system
yum search package_name searches for packages in the rpm warehouse
yum clean packages cleans the rpm cache and deletes downloaded packages
yum clean headers Delete all header files
yum clean all Delete all cached packages and header files
DEB package (Debian, Ubuntu and similar systems)
dpkg -i package.deb Install/update a deb package
dpkg -r package_name Delete a deb package from the system
dpkg -l displays all installed deb packages in the system
dpkg -l | grep httpd displays all deb packages whose names contain the word "httpd"
dpkg -s package_name Obtains a package that has been installed in the system Special package information
dpkg -L package_name displays the file list provided by a deb package that has been installed in the system
dpkg --contents package.deb displays the file list provided by a package that has not been installed
dpkg -S /bin/ping Confirm which deb package the given file is provided by
APT software tool (Debian, Ubuntu and similar systems)
apt-get install package_name Install/update a deb package
apt-cdrom install package_name Install/update a deb package from the CD
apt-get update Upgrade the software package in the list
apt-get upgrade Upgrade all installed software
apt-get remove package_name Delete a deb package from the system
apt-get check Confirm that the dependent software repository is correct
apt-get clean Clean the cache from the downloaded software package
apt-cache search searched-package Returns the package name containing the search string
View file content
cat file1 View the contents of a file forward starting from the first byte
tac file1 View the contents of a file backward starting from the last line
more file1 View the contents of a long file
less file1 Similar to 'more ' command, but it allows reverse operations in files that are the same as forward operations
head -2 file1 View the first two lines of a file
tail -2 file1 View the last two lines of a file
tail - f /var/log/messages View the content added to a file in real time
Text processing
cat file1 file2. .. | command <> file1_in.txt_or_file1_out.txt general syntax for text manipulation using PIPE, STDIN and STDOUT
cat file1 | command(sed, grep, awk, grep, etc...) > result.txt Merge the detailed description text of a file and write the description into a new file
cat file1 | command(sed, grep, awk, grep, etc...) >> result.txt Merge the detailed description of a file Description text, and write the introduction into an existing file
grep Aug /var/log/messages Search for the keyword "Aug" in the file '/var/log/messages'
grep ^Aug /var /log/messages Find words starting with "Aug" in the file '/var/log/messages'
grep [0-9] /var/log/messages Select all words in the file '/var/log/messages' Lines containing numbers
grep Aug -R /var/log/* Search for the string "Aug" in the directory '/var/log' and subsequent directories
sed 's/stringa1/stringa2/g' example .txt Replace "string1" in the example.txt file with "string2"
sed '/^$/d' example.txt Delete all blank lines from the example.txt file
sed '/ *#/ d; /^$/d' example.txt Delete all comments and blank lines from the example.txt file
echo 'esempio' | tr '[:lower:]' '[:upper:]' Merge upper and lower cells Content
sed -e '1d' result.txt Exclude the first line from the file example.txt
sed -n '/stringa1/p' View only the lines containing the word "string1"
sed -e 's/ *$//' example.txt Delete the last whitespace characters in each line
sed -e 's/stringa1//g' example.txt Delete only the word "string1" from the document and keep the rest
sed -n '1,5p;5q' example.txt View the content from the first line to the 5th line
sed -n '5p;5q' example.txt View the 5th line
sed -e 's /00*/0/g' example.txt Replace multiple zeros with a single zero
cat -n file1 Indicates the line number of the file
cat example.txt | awk 'NR%2==1' Delete example. All even-numbered lines in the txt file
echo a b c | awk '{print $1}' View the first column of a line
echo a b c | awk '{print $1,$3}' View the first and third columns of a line
paste file1 file2 Merges the contents of two files or two columns
paste -d ' ' file1 file2 Merges the contents of two files or two columns, using " " to distinguish
sort file1 file2 Sorts the contents of two files Content
sort file1 file2 | uniq takes out the union of two files (only one copy of duplicate lines is kept)
sort file1 file2 | uniq -u deletes the intersection, leaving other lines
sort file1 file2 | uniq -d takes out the intersection of two files (leaving only files that exist in both files)
comm -1 file1 file2 compares the contents of two files and only deletes the contents contained in 'file1'
comm -2 file1 file2 Compares the contents of two files and deletes only the contents contained in 'file2'
comm -3 file1 file2 Compares the contents of two files and deletes only the parts common to the two files
Character setting and file format conversion
dos2unix filedos.txt fileunix.txt Convert the format of a text file from MSDOS to UNIX
unix2dos fileunix.txt filedos.txt Convert a text file format from UNIX to MSDOS
recode ..HTML < page.txt > page.html Convert a text file to html
recode -l | more display All allowed conversion formats
File system analysis
badblocks -v /dev/hda1 Check bad blocks on disk hda1
fsck /dev/hda1 Repair/check the integrity of the linux file system on the hda1 disk
fsck.ext2 /dev/hda1 Repair/check the integrity of the ext2 file system on the hda1 disk
e2fsck /dev/hda1 Repair/check the integrity of the ext2 file system on the hda1 disk
e2fsck -j /dev/hda1 Repair/check the integrity of the ext3 file system on the hda1 disk
fsck.ext3 /dev/hda1 Repair/check the hda1 disk The integrity of the ext3 file system
fsck.vfat /dev/hda1 Repair/check the integrity of the fat file system on the hda1 disk
fsck.msdos /dev/hda1 Repair/check the integrity of the dos file system on the hda1 disk
dosfsck /dev/hda1 Repair/check the integrity of the dos file system on the hda1 disk
Initialize a file system
mkfs /dev/hda1 Create a file system in the hda1 partition
mke2fs /dev/hda1 Create a linux ext2 file system in the hda1 partition
mke2fs -j /dev/hda1 Create a linux ext3 (log type) file system
mkfs -t vfat 32 -F /dev/hda1 Create a FAT32 file system
fdformat -n /dev/fd0 Format a floppy disk
mkswap /dev/hda3 Create a swap file System
SWAP file system
mkswap /dev/hda3 Create a swap file system
swapon /dev/hda3 enable A new swap file system
swapon /dev/hda2 /dev/hdb3 Enable two swap partitions
##Backup dump -0aj -f /tmp/home0.bak /home Make a full backup of the '/home' directory
dump -1aj -f /tmp/home0.bak /home Make an interactive backup of the '/home' directory Backup
restore -if /tmp/home0.bak Restore an interactive backup
rsync -rogpav --delete /home /tmp Synchronize directories on both sides
rsync -rogpav -e ssh --delete /home ip_address :/tmp rsync via SSH channel
rsync -az -e ssh --delete ip_addr:/home/public /home/local Synchronize a remote directory to a local directory via ssh and compression
rsync -az -e ssh --delete /home/local ip_addr:/home/public Synchronize the local directory to the remote directory through ssh and compression
dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd of=hda. gz' Execute a local disk backup operation on the remote host through ssh
dd if=/dev/sda of=/tmp/file1 Back up the disk content to a file
tar -Puf backup.tar /home/user Perform an interactive backup operation of the '/home/user' directory
( cd /tmp/local/ && tar c . ) | ssh -C user@ip_addr 'cd /home/share/ && tar x -p' Copy the contents of a directory in a remote directory via ssh
( tar c /home ) | ssh -C user@ip_addr 'cd /home/backup-home && tar x -p' Copy a local directory in a remote directory via ssh
tar cf - . | (cd /tmp/backup ; tar xf - ) Copy a directory locally to another place, retaining the original permissions and links
find /home/user1 -name '*.txt' | xargs cp -av --target-directory=/home/backup/ --parents Find and copy all files ending with '.txt' from one directory to another directory
find /var/log -name '* .log' | tar cv --files-from=- | bzip2 > log.tar.bz2 Find all files ending with '.log' and make a bzip package
dd if=/dev/hda of= /dev/fd0 bs=512 count=1 Make an action to copy the contents of MBR (Master Boot Record) to the floppy disk
dd if=/dev/fd0 of=/dev/hda bs=512 count=1 Saved from Restore the MBR content from the floppy disk backup
CD cdrecord -v gracetime=2 dev=/dev/cdrom -eject blank=fast -force clears the contents of a rewritable disc
mkisofs /dev/cdrom > cd.iso Creates an iso image file of the disc on the disk
mkisofs /dev/cdrom | gzip > cd_iso.gz Create a compressed CD iso image file on the disk
mkisofs -J -allow-leading-dots -R -V "Label CD" -iso-level 4 -o ./cd.iso data_cd Create an iso directory Image file
cdrecord -v dev=/dev/cdrom cd.iso Burn an ISO image file
gzip -dc cd_iso.gz | cdrecord dev=/dev/cdrom - Burn a compressed ISO image file
mount -o loop cd.iso /mnt/iso Mount an ISO image file
cd-paranoia -B Rip audio tracks from a CD disc to a wav file
cd-paranoia -- "-3" Rip audio tracks from a CD disc Track to wav file (parameter -3)
cdrecord --scanbus Scan the bus to identify the scsi channel
dd if=/dev/hdc | md5sum Verify the md5sum encoding of a device, such as a CD
Network - (Ethernet and WIFI Wireless)
ifconfig eth0 Display the configuration of an Ethernet card
ifup eth0 Enable an 'eth0 ' Network device
ifdown eth0 Disable an 'eth0' network device
ifconfig eth0 192.168.1.1 netmask 255.255.255.0 Control IP address
ifconfig eth0 promisc Set 'eth0' into promiscuous mode for sniffing packets )
dhclient eth0 Enable 'eth0' in dhcp mode
route -n show routing table
route add -net 0/0 gw IP_Gateway configura default gateway
route add -net 192.168.0.0 netmask 255.255. 0.0 gw 192.168.1.1 configure static route to reach network '192.168.0.0/16'
route del 0/0 gw IP_gateway remove static route
echo "1" > /proc/sys/net/ipv4/ip_forward activate ip routing
hostname show hostname of system
host www.example.com lookup hostname to resolve name to ip address and viceversa(1)
nslookup www.example.com lookup hostname to resolve name to ip address and viceversa(2)
ip link show show link status of all interfaces
mii-tool eth0 show link status of 'eth0'
ethtool eth0 show statistics of network card 'eth0'
netstat -tup show all active network connections and their PID
netstat -tupl show all network services listening on the system and their PID
tcpdump tcp port 80 show all HTTP traffic
iwlist scan show wireless networks
iwconfig eth1 show configuration of a wireless network card
hostname show hostname
host www.example.com lookup hostname to resolve name to ip address and viceversa
nslookup www.example.com lookup hostname to resolve name to ip address and viceversa
whois www.example.com lookup on Whois database
JPS tool
jps(Java Virtual Machine Process Status Tool) is a command provided by JDK 1.5 to display the pid of all current java processes. It is simple and practical, and is very suitable for simply viewing some simple situations of the current java process on the linux/unix platform.
I think many people have used the ps command in the Unix system. This command is mainly used to display the process status of the current system, which processes there are, and their IDs. The same is true for jps. Its function is to display the java process status of the current system and its ID number. We can use it to see how many java processes we have started (because each java program will exclusively occupy a java virtual machine instance), and their process numbers (to prepare for the following programs), and can be viewed through opt Detailed startup parameters for these processes.
How to use: Run jps in the current command line (JAVA_HOME is required, if not, go to the directory where you want to change the program).
jps is stored in JAVA_HOME/bin/jps. For convenience, please add JAVA_HOME/bin/ to Path.
$> jps
23991 Jps
23789 BossMain
23651 Resin
Commonly used parameters:
-q Only the pid is displayed, the class name, jar file name and parameters passed to the main method are not displayed
$> jps -q
28680
23789
23651
-m outputs the parameters passed to the main method, which may be null on the embedded jvm
##$>jps -m28715 Jps -m
23789 BossMain
23651 Resin -socketwait 32768 -stdout /data/aoxj/resin/log/stdout.log -stderr /data/aoxj/resin/log/stderr.log
-l Output the complete package name of the application's main class or the full path name of the application's jar file
$>jps -l28729 sun. tools.jps.Jps
23789 com.asiainfo.aimc.bossbi.BossMain
23651 com.caucho.server.resin.Resin
-v Output parameters passed to the JVM
$>jps -v23789 BossMain
28802 Jps -Denv.class.path=/data/aoxj/bossbi/twsecurity/java/trustwork140.jar :/data/aoxj/bossbi/twsecurity/java/:/data/aoxj/bossbi/twsecurity/java/twcmcc.jar:/data/aoxj/jdk15/lib/rt.jar:/data/aoxj/jd
23651 Resin -Xss1m -Dresin.home=/data/aoxj/resin -Dserver.root=/data/aoxj /resin -Djava.util.logging.manager=com.caucho.log.LogManagerImpl -
Djavax.management.builder.initial=com.caucho.jmx.MBeanServerBuilderImpl
sudo jps has the most complete number of processes seen
##jps 192.168 .0.77
List all jvm instances of the remote server 192.168.0.77 machine, using rmi protocol, the default connection port is 1099
(premise It is the remote server that provides the jstatd service)
Note: There is a problem with the jps command. It seems that it can only display the java process of the current user. Do you want to display only the java processes of other users? Can use unix/linux ps command.
For more Linux-related technical articles, please visit theLinux Tutorial column to learn!
The above is the detailed content of Summary of commonly used linux commands. For more information, please follow other related articles on the PHP Chinese website!