
pwmconfig Command in Linux
The pwmconfig command in Linux tests the PWM outputs of the sensors and configures fan control. It is part of the lm-sensors package and works in conjunction with fancontrol, a daemon that automatically adjusts fan speeds based on temperature readings.
Table of Contents
Here is a comprehensive guide to the options available with the pwmconfig command â
- Installation of pwmconfig Command in Linux
- Syntax of pwmconfig Command
- How does pwmconfig Command Work?
- Examples of pwmconfig Command in Linux
Installation of pwmconfig Command in Linux
By default, pwmconfig may not installed on Linux. To install it on Ubuntu, Kali Linux, Debian, and Debian-based distributions, use the command given below −
sudo apt install fancontrol
To install it on Arch Linux, use the following command −
sudo pacman -S lm_sensors
To install pwmconfig on Fedora, use the following command −
sudo dnf install lm_sensors
To verify the installation of the pwmconfig command, check its binary using the which command −
which pwmconfig

Syntax of pwmconfig Command
The syntax of the pwmconfig command in Linux is as follows −
sudo pwmconfig
The pwmconfig command does not require any options or arguments, except that it must be run with sudo privileges.
How does pwmconfig Command Work?
The pwmconfig command scans the system for PWM-enabled hardware monitoring chips to detect PWM-capable sensors. It then tests fan responses to different PWM values to identify fan control capabilities. During this process, it prompts for confirmation on detected fans and their corresponding sensors. If successful, pwmconfig generates the /etc/fancontrol configuration file for use with the fancontrol daemon.
Examples of pwmconfig Command in Linux
This section explores how to use the pwmconfig command in Linux with examples −
Detecting and Configuring PWM for Fan Speed Control in Linux
To detect and configure the PWM for fan speed control on Linux, execute the pwmconfig command with sudo −
sudo pwmconfig

A prompt will appear, at this point, entering yes proceeds with fan detection. If fans are detected, pwmconfig tests their response. It checks the system for PWM controls and tests if they can adjust fan speed on the motherboard. However, some motherboards lack PWM hardware, even if the sensor chip supports it.
Once PWM control is linked to a fan, pwmconfig maps how the fan responds to different PWM duty cycles, determining the relationship between speed and control signals. It then enters configuration mode to set parameters for fancontrol, including fan-temperature mappings, speed adjustments, and minimum fan speed. On successful execution, pwmconfig generates a configuration file (/etc/fancontrol).
Conclusion
The pwmconfig command in Linux tests and configures PWM-based fan control using sensors. It scans the system for PWM-enabled monitoring chips, identifies fan responses, and generates a configuration file for fancontrol, which automatically adjusts fan speeds based on temperature.
If compatible hardware is detected, pwmconfig links PWM controls to fans and sets parameters for speed adjustments. Some motherboards may not support PWM fan control despite having compatible sensor chips. The generated configuration file enables automated fan speed regulation, improving system cooling efficiency.