Common commands for Linux systems (i)

Source: Internet
Author: User

1.1. Top Command detailed

when you read and write a file, to improve read and write performance and speed, the Linux kernel caches files in memory, which is the cachememory. Even after your program runs,theCache memory will not be released automatically, which will cause you to read and write files frequently in your Linux system, and you will find that there is little physical memory available.

In fact, this cache memory ( Cache memory) is automatically released when you need to use it, so you don't have to worry about not having memory available. If you want to release the Cache Memory manually , there is a way.

Summary: View The CPU usage can be the value corresponding to the %id in the top command .

1.2. Viewing system memory

Free-m

Total used free shared bufers cached

mem:24009 21754 2254 0 281 11549

system available Memory =free+shared+buffers+cached

1.3. Kill a process

Ps-ef|grep Intea Find the first column of the pid,kill-9 pid

1.4. remote logins for various protocols

SSH 11.12.205.40

Telnet 1.12.15.27

FTP 11.12.15.117

1.5. Change the user and group to which the file belongs

Chaown-r tduser:tdgroup File

-R indicates that subfolders and files under the specified path are in effect

1.6. change file read and Write permissions

chmod 765 File

Self is 7, the same group of users is 6, other users are 5

1.7. view disk and file size commands

Df-hl

View the usage of individual disk space for each system

Du-sh *

View individual folder sizes under the current path

1.8. View Linux system versions

View Linux kernel version:cat/proc/version

View Linux Distributions:cat/etc/issue

1.9. To copy files between different hosts SCP command

SCP [email protected]:/home/software/breeze_ideploy_v100r001c80/pkg/"Test\ \" &\ diagnosis/v100r002c30_appinstall.zip "//opt/huawei/

copy files from the remote host to the/opt/huawei/directory of the current host

if the name of the file or folder in the path has spaces or other special characters, you need to first enclose the name in double quotation marks, and then use "\" to escape the special characters.

1.10. Set native disable ping

Vi/proc/sys/net/ipv4/icmp_echo_ignore_all

The number is0, can be ping,number 1 cannot be ping

because proc is a pseudo-file system that is stored in memory, it is stored in the system's current information and kernel parameters. So can not vi to edit, can only use Echo to redirect:

echo "1" >/proc/sys/net/ipv4/icmp_echo_ignore_all

Common commands for Linux systems (i)

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.