Editaremos el fichero .bashrc del home del usurio y pondremos:
function temp(){
sensors | grep ‘Package’ | cut -d ‘ ‘ -f5
}
PS1=’\u@\h-$(show_temp) # ‘
Quedará:
sensors
acpitz-acpi-0
Adapter: ACPI interface
temp1: +27.8°C
temp2: +29.8°C
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +58.0°C (high = +84.0°C, crit = +100.0°C)
Core 0: +47.0°C (high = +84.0°C, crit = +100.0°C)
Core 1: +48.0°C (high = +84.0°C, crit = +100.0°C)
root@pve-58.0 #