The Linux Swiss army knife
Not long ago, I wrote a post with 25 one-command-liners that allow you to do complex things with just one line without using the graphical interface. Now, I will show you a list of commands to turn you into the perfect Linux mechanic.
Note: All commands have been tested on ubuntu 20.04. To execute some commands, you will need administrator permissions.
System information
Check the battery’s status via the terminal
This command outputs a lot of status and statistical information about the battery.
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
In my case, I’m using ubuntu on a virtualized machine, so it doesn’t show relevant stats, but if you try it on a native installation, it will show you a lot of helpful information.
Time the machine has been running
The <uptime> command returns information about how long the system has been running since it was started up the last time.