Common Linux commands during development: Develop linux commands

Source: Internet
Author: User

Common Linux commands during development: Develop linux commands

After several years of Java Development, Java Web is deployed on the server. Generally, Linux is the best choice for Linux as a server. High Performance. As long as you are familiar with Linux, the operation is fast and efficient.

Summary:

I. File Operation commands

1. Create a directory

Mkdir software

2. Create a multi-level directory

Mkdir/opt/software/-P

3. delete files or directories

Rm test. sh the interaction process that requires y confirmation after the DELETE command is run.

Rm-FYou do not need to enter yes for direct force deletion of test. sh.

Rm-Rf/Opt/software directly force the directory to be deleted without entering yes

 

Create a new file

Edit File

Decompress the tar.gz package

 

2. Port and process-related commands

View port usage

Netstat-LntCheck which ports are currently listening

Lsof-I:8080(Port Number) to check which application occupies port 8080

View process running status

Ps-ef | grepNginx

View System Version

Set system date

View real-time log output

View large file logs

Bytes -----------------------------------------------------------------------------------------

# Uname-a # view kernel/operating system/CPU Information
# Head-n 1/etc/issue # view the operating system version
# Cat/proc/cpuinfo # view CPU Information
# Hostname # view the computer name
# Lspci-TV # list all PCI devices
# Lsusb-TV # list all USB devices
# Lsmod # list loaded Kernel Modules
# Env # view environment variable resources
# Free-m # view memory usage and swap zone usage
# Df-h # view the usage of each partition
# Du-sh <Directory Name> # view the size of a specified directory
# Grep MemTotal/proc/meminfo # view total memory
# Grep MemFree/proc/meminfo # view the Amount of idle memory
# Uptime # view system running time, number of users, and load
# Cat/proc/loadavg # view system load disks and partitions
# Mount | column-t # view the status of the mounted Partition
# Fdisk-l # view all partitions
# Swapon-s # view all swap partitions
# Hdparm-I/dev/hda # view disk parameters (only applicable to IDE devices)
# Dmesg | grep IDE # view the network of the IDE Device Detection Status at startup
# Ifconfig # view the attributes of all network interfaces
# Iptables-L # view firewall settings
# Route-n # view the route table
# Netstat-lntp # view all listening ports
# Netstat-antp # view all established connections
# Netstat-s # view network statistics process
# Ps-ef # view all processes
# Top # real-time display of Process status users
# W # view active users
# Id <User Name> # view specified user information
# Last # view User Logon logs
# Cut-d:-f1/etc/passwd # view all users in the system
# Cut-d:-f1/etc/group # view all groups in the system
# Crontab-l # view the scheduled Task Service of the current user
# Chkconfig-list # list all system services
# Chkconfig-list | grep on # list all started system service programs
# Rpm-qa # view all installed software packages

 

Not complete to be continued!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.