Linux Commands
Jump to navigation
Jump to search
Get Modems Serial Port #
This finds the tty port for the modem by trying to find the irq used by the modem and then looking it up in either dmesg or /proc/tty/driver/serial
Normal User
dmesg | grep "irq = `lspci | grep Communication | awk '{print $1}' | xargs -n1 -i lspci -v -s {} | grep IRQ | awk -FIRQ\ '{print $2}'`"
Root
lspci | grep Communication | awk '{print $1}' | xargs -n1 -i lspci -v -s {} | grep IRQ | awk -FIRQ\ '{print $2}' | xargs -n1 -i grep {} /proc/tty/driver/serial
Setup Power Management for Monitor
- Edit /etc/X11/xorg.conf
- Add the following to the "ServerLayout" section:
Option "BlankTime" "3" Option "StandbyTime" "0" Option "SuspendTime" "0" Option "OffTime" "4"
- Add the following to the "Monitor" section:
Option "DPMS"
Power off Monitor
xset dpms force off
Control Volume from CLI
This is useful for setting the volume for alarms in a bash script / command line.
Syntax: amixer sset Master,0 <LEFT%>,<RIGHT%>
amixer sset Master,0 unmute amixer sset Master,0 100%,100%
Get Info on System Hardware from BIOS
Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard.
dmidecode