Home >Operation and Maintenance >Linux Operation and Maintenance >What are the commonly used Linux commands?

What are the commonly used Linux commands?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-07-23 16:47:1815242browse

What are the commonly used Linux commands?

Comprehensive list of common 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

uname - m Display the processor architecture of the machine

uname -r Display the kernel version being used

dmidecode -q Display the hardware system components - (SMBIOS/DMI)

hdparm -i /dev/hda Lists the architectural features of a disk

hdparm -tT /dev/sda Performs test read operations on the disk

cat /proc/cpuinfo Displays CPU info information

cat /proc/interrupts Display interrupts

cat /proc/meminfo Verify memory usage

cat /proc/swaps Display 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 the 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

init 0 Shut down the system

telinit 0 Shut down the system

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

reboot Restart

logout Logout

File and Directory

cd /home Enter the '/ home' directory'

cd .. Return to the previous directory

cd ../.. Return to the previous two levels Directory

cd Enter the personal home directory

cd ~user1 Enter the personal home directory

cd - Return to the last directory

pwd Display work Path

ls View 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 Display the tree structure of files and directories starting from the root directory

lstree displays the tree structure of files and directories starting from the root directory

mkdir dir1 Creates a directory called 'dir1'

mkdir dir1 dir2 Creates 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 the 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 to a file or directory

touch -t 0712250000 file1 Modify 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 search starting from '/' Files and directories

find / -user user1 Search for files and directories belonging to user 'user1'

find /home/user1 -name \*.bin in the directory '/home/user1' Search for files ending with '.bin'

find /usr/bin -type f -atime 100 Search for executable files that have not been used in the past 100 days

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' file and define its 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 Display the full path of a binary file or executable file

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 an unmount when the device is busy

umount -n /mnt/hda2 Run an unmount operation without writing 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 Mount a usb USB drive or flash memory device

mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share Mount a windows network share

Disk space

df -h Display the mounted partition list

ls -lSr |more Arrange files and directories by size

du -sh dir1 Estimated directory' dir1' Used disk space'

du -sk * | sort -rn Display 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 user password

pwck Check the file format and syntax correction of '/etc/passwd' and existing users

grpck Check the file format and syntax correction of '/etc/passwd' and existing groups

newgrp group_name Log in to a new group to change the default group for newly created files

Permissions of files - use " " to set permissions, use "-" is used to cancel

ls -lh display permissions

ls /tmp | pr -T5 -W$COLUMNS Divide the terminal into 5 columns for display

chmod ugo rwx directory1 sets the read (r), write (w) and execute (x) permissions for the directory owner (u), group (g) and others (o)

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 the owner attribute of a file

chown -R user1 directory1 Change a Change the owner attribute of the 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 the owner and group attributes of a file

find / -perm -u s Lists all files controlled by SUID in a system

chmod u s /bin/file1 Sets the SUID bit of a binary file - the user running the file is also Grant the same permissions as the owner

chmod u-s /bin/file1 Disable the SUID bit of a binary file

chmod g s /home/public Set the SGID bit of a directory - similar to SUID, but this It is for directories

chmod g-s /home/public disables the SGID bit of a directory

chmod o t /home/public sets the STIKY bit of a file - only allows legal owners to delete files

chmod o-t /home/public disables the STIKY bit of a directory

Special attributes of files - 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 This file will be ignored

chattr i file1 Set to 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 applied The program performed a write operation on this file, causing the system to immediately write the modification results to the disk

chattr u file1 If the file is deleted, the system will allow you to restore the deleted file later

lsattr Display special attributes

Related recommendations: "linux operation and maintenance tutorial"

Packaging and compressing files

bunzip2 file1.bz2 Decompress a file called 'file1.bz2'

bzip2 file1 Compress a file called 'file1'

gunzip file1.gz Decompress a file called 'file1.gz'

gzip file1 Compress 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 Unzip the rar package

unrar x file1.rar Decompress the rar package

tar -cvf archive.tar file1 Create a non-compressed tarball

tar -cvf archive.tar file1 file2 dir1 Create a file containing 'file1', 'file2 ' and the archive file of '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

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 Compressed package

zip file1.zip file1 Create a compressed package in zip format

zip -r file1.zip file1 file2 dir1 Compress several files and directories at the same time into a compressed package in zip format

unzip file1.zip Unzip a zip format compressed package

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 has been installed

rpm -e package_name.rpm Delete an rpm package

rpm -qa Display all files in the system Installed rpm packages

rpm -qa | grep httpd Displays all rpm packages whose names contain the word "httpd"

rpm -qi package_name Gets special information about an installed package

rpm -qg "System Environment/Daemons" displays the rpm package of a component

rpm -ql package_name displays the file list provided by an installed rpm package

rpm -qc package_name displays 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 Displays an rpm that has not yet been installed List of files provided by the package

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

rpm -V package_name Check file size, license, type, owner, group, MD5 check and finally Modification time

rpm -Va Check all installed rpm packages in 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 executable files from an rpm package

rpm -ivh /usr/src/redhat/RPMS/`arch`/package.rpm From an rpm package rpm source code to install a built package

rpmbuild --rebuild package_name.src.rpm Build an rpm package from an rpm source code

YUM 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 Relationship

yum update package_name.rpm updates all rpm packages installed in the current system

yum update package_name updates 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 Search for software packages in the rpm repository

yum clean packages Clean rpm cache and delete downloaded packages

yum clean headers Delete all header files

yum clean all Delete all cached packages and header files

DEB packages (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 names containing The deb package with the word "httpd"

dpkg -s package_name obtains information about a special package that has been installed in the system

dpkg -L package_name displays the information provided by a deb package that has been installed in the system File list

dpkg --contents package.deb Display the file list provided by a package that has not yet been installed

dpkg -S /bin/ping Confirm which deb package provides the given file

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 packages 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 name of the software package containing the search string

View the file content

cat file1 View the content of the file forward starting from the first byte

tac file1 View the contents of a file in reverse order starting from the last line

more file1 View the contents of a long file

less file1 Similar to the '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 one Detailed description text of the file, and write the introduction into a new file

cat file1 | command(sed, grep, awk, grep, etc...) >> result.txt Merge a file Detail the text and write the introduction to 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 ' /var/log/messages' All lines containing numbers in the file

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 Remove all blank lines from the example.txt file

sed '/ *#/d; /^$/d' example.txt Remove all comments and blank lines from the example.txt file

echo 'esempio' | tr '[:lower:]' '[:upper:]' Merge the contents of upper and lower cells

sed -e '1d' result.txt Exclude the first one from the file example.txt Line

sed -n '/stringa1/p' View lines containing only the word "string1"

sed -e 's/ *$//' example.txt Delete the last of each line White space characters

sed -e 's/stringa1//g' example.txt Remove only the word "string1" from the document and keep all the rest

sed -n '1,5p;5q ' example.txt View content from line 1 to line 5

sed -n '5p;5q' example.txt View line 5

sed -e 's/00*/ 0/g' example.txt Replace multiple zeros with a single zero

cat -n file1 indicates the number of lines in the file

cat example.txt | awk 'NR%2==1' Delete All even-numbered lines in the example.txt file

echo a b c | awk '{print $1}' to view the first column of a line

echo a b c | awk '{print $1,$3}' to view a line The first and third columns

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 " "Distinguish

sort file1 file2 Sort the contents of two files

sort file1 file2 | uniq Take out the union of two files (only one copy of duplicate lines is kept)

sort file1 file2 | uniq -u deletes the intersection and leaves other lines

sort file1 file2 | uniq -d removes the intersection of two files (leaving only files that exist in both files)

comm -1 file1 file2 compares the contents of two files and deletes only ' The content contained in file1'

comm -2 file1 file2 Compares the contents of two files and only deletes the contents of 'file2'

comm -3 file1 file2 Compares the contents of two files only Delete the common parts of 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 disk hda1 Bad disk block

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 Performance

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 integrity of the ext3 file system on the hda1 disk

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 in the hda1 partition File system

mke2fs -j /dev/hda1 Create a linux ext3 (log type) file system in the hda1 partition

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 partition

Backup

dump -0aj -f /tmp/home0.bak /home Make a complete backup of the '/home' directory

dump -1aj -f /tmp/home0.bak /home Make an interactive backup of the '/home' directory

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 through SSH channel

rsync -az - e ssh --delete ip_addr:/home/public /home/local Synchronize a remote directory to a local directory through ssh and compression

rsync -az -e ssh --delete /home/local ip_addr:/home /public Sync local directory to remote directory via ssh and compression

dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd of=hda.gz' on the remote host via ssh Execute a local disk backup operation

dd if=/dev/sda of=/tmp/file1 Back up the disk content to a file

tar -Puf backup.tar /home/user Execute it once 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 the remote directory through ssh

( tar c /home ) | ssh -C user@ip_addr 'cd /home/backup-home && tar x -p' In the remote directory through ssh Copy a local directory

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 Restore MBR contents from backup that has been saved to floppy disk

CD

cdrecord -v gracetime =2 dev=/dev/cdrom -eject blank=fast -force Empty the contents of a rewritable disc

mkisofs /dev/cdrom > cd.iso Create 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 image file of a directory

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 Transfer tracks from a CD disc to a wav file

cd-paranoia -- "-3" Rip recording tracks from a CD disc to a wav file (parameter -3)

cdrecord --scanbus Scan the bus to identify scsi channels

dd if= /dev/hdc | md5sum Verifies the md5sum encoding of a device, such as a CD

Network- (Ethernet and WIFI wireless)

ifconfig eth0 displays an Ethernet Network card configuration

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 to sniff packets (sniffing)

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

nslookup www.example.com lookup hostname to resolve name to ip address and viceversa

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 simple use on linux/unix platforms. Check out some simple situations of the current java process.

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.

Usage: Run jps under the current command line (JAVA_HOME is required, if not, go to the directory where the program is changed).

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 displays the pid, not the pid class name, jar file name and parameters passed to the main method

$> jps -q

28680

23789

23651

-m outputs the parameters passed to the main method, which may be null on the embedded jvm

##$> jps -m

28715 Jps -m

23789 BossMain

23651 Resin -socketwait 32768 -stdout /data/aoxj/resin/log/stdout.log -stderr /data/aoxj/resin/log/stderr.log

-l Outputs the full package name of the application's main class or the full path name of the application's jar file##$> jps -l

28729 sun. tools.jps.Jps

23789 com.asiainfo.aimc.bossbi.BossMain

23651 com.caucho.server.resin.Resin

-v output pass Parameters for JVM

$> jps -v

23789 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

k15/lib/tools.jar -Dapplication.home=/data/aoxj/jdk15 -Xms8m

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

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

(provided that the remote server provides jstatd service)

Note: jps command There is a very bad thing. It seems that only the current user's java process can be displayed. To display other users's, you can only use the unix/linux ps command.

The above is the detailed content of What are the commonly used Linux commands?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn