Last update at :2024-05-26,Edit by888u
Vpsadd tutorial: The most commonly used commands in Linux Command Linux common commands File management cat chattr chgrp chmod chown cksum cmp
diff diffstat file find git gitview indent
cut ln less locate isattr mattrib mc
mdel mdir mktemp more move mread mren
mtools mtoolstest mv od paste patch rcp
rm locate split tee tmpwatch touch umask
which cp in mcopy mshowfat rhmask whereis
Disk management cd df dirs du edquota eject
mcd mdeltree mdu mkdir mlabel mmd
mrd mzip pwd quota mount mmount
rmdir rmt stat tree umount ls
quotacheck quotaoff lndir repquota quotaon
Document editing col colrm comm csplit ed egrep ex fgrep
fmt fold grep ispell jed joe join look
mtype pico rgrep sed sort spell tr expr
uniq wc
File transfer lprm lpr lpq lpd bye ftp
uuto uupick uucp uucico tftp ncftp
ftpshut ftpwho ftpcount
Disk maintenance badblocks cfdisk dd e2fsck ext2ed
fsck fsck fsconf fdformat hdparm
mformat mkbootdisk mkdosfs mke2fs mkfs.ext2
mkfs.msdos mkinitrd mkisofts mkswap mpartition
swapon Symlinks sync mbadblocks mkfs
fsck.ext2 fdisk losetup mkfs sfdisk
swapoff
Network communication apachectl arpwatch dip getty mingetty uux
telnet uulog uustat ppp-off netconfig nc
httpd ifconfig minicom mesg dnsconf wall
netstat ping pppstats samba setserial talk
traceroute tty newaliases uuname netconf write
statserial efax pppsetup tcpdump ytalk cu
smbd testparm smbd smbclient shapecfg
System management adduser f useradd date exit finger
fwhois sleep suspend groupdel groupmod halt
kill last lastb login logname logout
ps nice procinfo top pstree reboot
rlogin rsh sliplogin screen shutdown rwho
sudo gitps swatch tload logrotate kill
uname chsh userconf userdel usermod vlock
who whoami whois newgrp renice su
skill w ID free
System settings reset clear alias dircolors aumix bind
chroot clock crontab declare depmod dmesg
enable eval export pwunconv grpconv rpm
insmod kbdconfig lilo liloconfig lsmod minfo
set modprobe ntsysv mouseconfig passwd pwconv
rdate resize rmmod grpunconv modinfo time
setup sndconfig setenv setconsole timeconfig ulimit
unset chkconfig apmd hwclock mkkickstart fbset
unalias SVGAText Mode
Backup compression ar bunzip2 bzip2 bzip2recover gunzip unarj
compress cpio dump uuencode gzexe gzip
lha restore tar uudecode unzip zip
zipinfo
Equipment management setleds loadkeys rdev dumpkeys MAKEDEV
ls cd mkdir rmdir cp rm mv f cat more le pwd clear ln grep find ar rpm mount umount
1. The top command can view the system status in real time:
top – 14:11:08 up 18:28, 1 user, load average: 0.08, 0.18, 0.24 Tasks: 112 total, 1 running, 111 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.7%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1015064k total, 992444k used, 22620k free, 31504k buffers Swap: 524284k total, 1308k used, 522976k free, 558164k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3770 root 20 0 55596 3352 2740 S 0.3 0.3 0:25.56 ss-server 3825 root 20 0 49068 2200 2060 S 0.3 0.2 0:08.77 ss-server 3844 root 20 0 49068 2208 2060 S 0.3 0.2 0:08.67 ss-server 1 root 20 0 10424 1340 1264 S 0.0 0.1 0:01.51 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:07.70 ksoftirqd/0 4 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H 6 root 20 0 0 0 0 S 0.0 0.0 0:05.01 kworker/u2:0 7 root 20 0 0 0 0 S 0.0 0.0 0:24.00 rcu_sched 8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh 9 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper 11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs 12 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns 13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch 14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u2:1
#Not complete, there are some other processes below, no detailed description The key area to focus on is the load average in the first row, which is the system load, that is, the entire VPS resource usage. If the website is built normally, it rarely exceeds 5. If the BURST exceeds 20, the account will be banned. The first one in the third row is the resource occupied by the CPU. There is also the following ??%wa, which is the status of the hard disk. Under normal circumstances, it is best not to occupy more than 30% of the CPU. If the wa index is above 30% for a long time, the hard disk is basically in a weak state. The fourth row is memory, how much is the total, how much is used, and how much is left.
2.wget command downloads network files, for example:
wget http://www.xxx.com/100mb.test 3.chmod command #The following is the description of this command
chmod +x /home/auto.sh #Give auto.sh executable permissions chmod -R 777 /home/wwwroot # Grant write permission to /home/wwwroot (required when installing some website programs) 4.mv command moves files
mv /home/wwwroot/abc.tar.gz /home/backup # Move abc.tar.gz to the backup directory 5.rm command delete files
rm test.tar.gz # Delete test.tar.gz, you will be prompted to confirm y. rm -rf /home/wwwroot/test # Delete the test directory without prompting. Do not use it indiscriminately. Remember. 6.tar command C packaging and X decompression files
tar zcvf test.tar.gz /home/wwwroot #Package /home/wwwroot tar zxvf tet.tar.gz # Decompress test.tar.gz in the current directory 7. Several other commonly used ones
cd Example: cd /home/wwwroot # Enter a directory ls # View files in the current directory echo nameserver 8.8.8.8 >> /etc/resolv.conf #Set dns to Google
Recommended site searches: anti-complaint servers, host discount codes, foreign permanent free server recommendations, how to register a domain name, how much does it cost to rent a registration-free space and a free network server for one year, foreign domain name application, domain name registration center, Korean independent server, rental Server,
发表评论