rfkill介绍

用途

rfkill是一个内核级别的管理工具,可以打开和关闭设备的蓝牙和wifi。

rfkill是Linux下的一个标准的无线控制的虚拟设备,Linux也提供了rfkill的命令去查看以及控制所有的注册的无线设备。它们会在/dev/(PC的Linux)或者/sys/class(一般是Android)下生成相应的虚拟设备。

原文

rfkill - tool for enabling and disabling wireless devices

rfkill-用于启用和禁用无线设备的工具

SYNOPSIS

   rfkill [options] [command] [id|type ...]
简介
	rfkill [参数] [命令] [编号|类型...]

DESCRIPTION

   rfkill lists, enabling and disabling wireless devices.
说明
	rfkill列表,启用和禁用无线设备。

The command “list” output format is deprecated and maintained for backward compatibility only.
The new output format is the default when no command is specified or when the option --output is used.
The default output is subject to change.
So whenever possible, you should avoid using default outputs in your scripts.
Always explicitly define expected columns by using the --output option together with a columns list in environments where a stable output is required.

命令“list”输出格式已弃用,并仅为向后兼容而保留。当未指定命令或当选项--output输出。
默认输出可能会发生更改。因此,只要可能,就应该避免在脚本中使用默认输出。始终使用
--output 选项以及需要稳定输出的环境中的列列表。

OPTIONS 选项参数

   -J, --json   
	Use JSON output format.         
	使用JSON输出格式。
   -n, --noheadings
	Do not print a header line.
	不要打印标题行。
   -o, --output
	Specify which output columns to print.  Use --help to get a list of available columns.
	指定要打印的输出列。使用--help获取可用列的列表。
   --output-all
  	Output all available columns.
  	输出所有可用列。
   -r, --raw
          Use the raw output format.
	Use the raw output format.
	使用原始输出格式。
   --help 
	Display help text and exit.
	显示帮助文本并退出。
   --version
Display version information and exit.
显示版本信息并退出。

COMMANDS 命令

list [id|type …]

List the current state of all available devices.
The command output format is deprecated, see the section DESCRIPTION.
It is a good idea to check with list command id or type scope is appropriate before setting block or unblock.
Special all type string will match everything. Use of multiple id or type arguments is supported.

列出所有可用设备的当前状态。
命令输出格式已弃用,请参阅“描述”一节。
在设置阻止或取消阻止之前,最好使用列表命令id或类型scope进行检查。
特殊的所有类型字符串将匹配所有内容。支持使用多个id或类型参数。
block id|type […]

Disable the corresponding device.

禁用相应的设备
unblock id|type […]

Enable the corresponding device.
If the device is hard-blocked, for example via a hardware switch, it will remain unavailable though it is now soft-unblocked.

启用相应的设备。
如果设备被硬阻止,例如通过硬件开关,它将保持不可用,尽管它现在是软阻止的。

EXAMPLE 例子

rfkill --output ID,TYPE
rfkill block all
rfkill unblock wlan
rfkill block bluetooth uwb wimax wwan gps fm nfc

AUTHORS 作者

rfkill was originally written by Johannes Berg ⟨johannes@sipsolutions.net⟩ and Marcel Holtmann ⟨marcel@holtmann.org⟩.
The code has been later modified by Sami Kerola⟨kerolasa@iki.fi⟩ and Karel Zak ⟨kzak@redhat.com⟩ for util-linux project.

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值