sensors
Display hardware sensor readings
TLDR
Show the current readings of all sensor chips
Show temperatures in degrees Fahrenheit
SYNOPSIS
sensors [options] [chip-name]
where options include:
-A, --no-adapter
-D, --debug
-f, --fahrenheit
-c, --celsius
-u, --units {fahrenheit | celsius | raw}
-j, --json
-s, --silent
-h, --help
-v, --version
And chip-name specifies a particular sensor chip (e.g., coretemp-isa-0000).
PARAMETERS
-A, --no-adapter
Do not print the adapter name for each chip, providing a more concise output.
-D, --debug
Output verbose debugging information, useful for troubleshooting sensor detection issues.
-f, --fahrenheit
Display temperatures in Fahrenheit instead of the default Celsius.
-c, --celsius
Display temperatures in Celsius (this is the default behavior).
-u, --units {fahrenheit | celsius | raw}
Specify the temperature units for output, overriding -f/-c. 'raw' provides direct numerical values from the sensor.
-j, --json
Output sensor data in JSON format, which is highly useful for scripting and integration with other tools.
-s, --silent
Suppress the output of chip and adapter names, providing a more compact output suitable for scripting.
-h, --help
Display a help message and exit.
-v, --version
Display the program version and exit.
chip-name
Restrict output to a specific sensor chip, identified by its name (e.g., coretemp-isa-0000 or nouveau-pci-0100).
DESCRIPTION
The sensors command is a crucial utility from the lm-sensors package, designed to display real-time readings from various hardware sensors within a Linux system. It provides vital information such as CPU core temperatures, GPU temperatures, motherboard voltages, fan speeds, and sometimes even power consumption or humidity, depending on the available hardware and configured sensors.
This command leverages the Linux kernel's sensor drivers (e.g., coretemp for Intel CPUs, k10temp for AMD CPUs, nct6775 for Super I/O chips, etc.) to access raw sensor data. Before sensors can display meaningful output, the lm-sensors package must be installed, and typically, the sensors-detect utility needs to be run to identify and configure the necessary kernel modules for your specific hardware. Monitoring these readings is essential for maintaining system health, preventing overheating, diagnosing potential hardware issues, and optimizing system performance by ensuring components operate within safe thermal limits. It's an invaluable tool for system administrators, enthusiasts, and anyone concerned about the internal well-being of their machine.
CAVEATS
sensors relies heavily on the underlying lm-sensors framework. It requires the lm-sensors package to be installed and the sensors-detect utility to have been run successfully to identify and load the appropriate kernel modules for your specific hardware. Without proper module loading (e.g., coretemp for Intel CPUs, k10temp for AMD, nct6775 for Super I/O chips), sensors may report no data or incomplete data. Not all hardware components are supported by lm-sensors, and some readings might be missing or inaccurate depending on the sensor chip and its configuration. Additionally, access to certain sensor data might require root privileges or specific user permissions.
GETTING STARTED
To use sensors, you typically need to install the lm-sensors package (e.g., sudo apt install lm-sensors on Debian/Ubuntu, or sudo dnf install lm_sensors on Fedora). After installation, run sudo sensors-detect and answer 'yes' to detect and load the necessary kernel modules for your hardware. You may need to reboot or load modules manually for changes to take effect.
INTERPRETING OUTPUT
The output of sensors typically shows chip names, specific sensor labels (e.g., Package id, Core 0), current readings, and sometimes low/high/critical limits. Temperatures often have 'high' and 'crit' thresholds, indicating when a component is reaching unsafe operating temperatures. Voltages might show 'in' for input, 'Vcore' for CPU voltage, etc. Fan speeds are usually in RPM (Revolutions Per Minute).
COMMON USE CASES
sensors is widely used for real-time system health monitoring, especially for checking CPU and GPU temperatures to prevent overheating during heavy loads. It's frequently combined with other commands like watch(1) (watch -n 1 sensors) for continuous monitoring or piped to grep(1) for specific readings (sensors | grep 'Core'). Its -j option for JSON output makes it ideal for scripting and integration with other monitoring tools.
HISTORY
The sensors command is part of the broader lm-sensors (Linux Monitoring Sensors) project, which originated in the late 1990s. Its primary goal was to provide a standardized, user-space interface for accessing and interpreting data from various hardware monitoring chips (such as those found on motherboards, CPUs, and GPUs). Before lm-sensors, obtaining such data often required vendor-specific tools or direct, complex access to hardware registers. The project evolved significantly, abstracting hardware details through kernel modules, making it easier for users and applications to monitor system health. lm-sensors became a critical component for thermal management, performance monitoring, and debugging hardware issues in Linux systems, with its development driven by a dedicated community.
SEE ALSO
sensors-detect(8), fancontrol(8), pwmconfig(8), lm_sensors(4), hwmon(4), watch(1), grep(1)