Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of the Linux basic command sysctl

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "the usage of Linux basic command sysctl". In daily operation, I believe many people have doubts about the usage of Linux basic command sysctl. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "the usage of Linux basic command sysctl"! Next, please follow the editor to study!

Sysctl

The sysctl directive is used to modify running kernel parameters. All parameters that can be modified are saved in the / proc/sys/ directory, and the changes take effect immediately. Sysctl support in Linux requires Procfs. You can use sysctl to read and write sysctl data.

The scope of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora, SUSE, openSUSE.

1. Grammar

Sysctl [- n] [- e] variable...

Sysctl [- n] [- e] [- Q]-w variable=value...

Sysctl [- n] [- e] [- Q]-p

Sysctl [- n] [- e]-a

Sysctl [- n] [- e]-A

2. List of options

Option

Description

-n

Displays the value of the kernel parameter, not its name

-e

Ignore errors

-N

Show only the first name

-Q

Do not display values in standard output

-w

You need to copy it.

-p

Settings for loading sysctl

-a |-A

Displays the values and names of all kernel parameters

Variable

The name of the variable read, which can be delimited with "/"

Variable=value

If the value contains quotation marks or characters parsed by shell, you may need to enclose the value in double quotes. This requires the-w parameter.

3. Examples

Show all kernel parameters

[root@localhost ntop-4.0.1] # sysctl-a / / displays all kernel parameter names and values

...

Sunrpc.transports = tcp 1048576

Sunrpc.transports = udp 32768

Sunrpc.transports = tcp-bc 1048576

Sunrpc.udp_slot_table_entries = 16

Sunrpc.tcp_slot_table_entries = 2

Sunrpc.tcp_max_slot_table_entries = 65536

Sunrpc.min_resvport = 665

Sunrpc.max_resvport = 1023

Sunrpc.tcp_fin_timeout = 15

At this point, the study of "the usage of the Linux basic command sysctl" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report