Terminal commands


Message d'état

If you have any questions about this page or if you find any errors, please write a message to the support wall and a Labdoo volunteer will help resolve it. Thank you for helping to improve our wiki pages.

Helpful terminal commands

Even if, contrary to popular opinion, the use of a terminal in Linux is not absolutely necessary, it does offer some advantages. Terminal commands give you output faster than pushing the mouse. Terminal commands can be controlled and linked in a variety of ways using arguments and are therefore the method of choice for more complex problem solving.

To open a terminal, click on the icon at the bottom left of the bottom menu bar or press Ctrl + Alt + t on the keyboard.

If a command is refused with the note "permission denied" or root rights are required, type "sudo" before the command used, e.g. "sudo zzzfm"

For further information use the --help option e.g. "apt --help" or the man pages "man apt"

Application Description
acpi (-V) Information about the power system such as battery status, battery status, etc.
(sudo) apt Package manager

sudo apt update >> Creates the required package database
sudo apt install mousepad >> installs the program "mousepad" for example
Only useful in persistence mode. The device must be connected to the Internet.

dd Bit-accurate copying


dd /path/to/ISO /path/to/USB stick bs=1M >> bit-precise copying of an ISO file to a USB stick

eject -T ejects CDs or DVDs if the button on the drive is defective.
grep filters the output of commands

acpi -V | grep -i battery >> Show only the lines of acpi -V that contain the word "battery"

(sudo) inxi System information

sudo inxi -v 5 >> Information with verbosity level 5 (1-8 possible)
inxi -B >> Battery information
sudo inxi -M >> information about the system
inxi -m >> Information about the memory (RAM)
sudo is only needed if information that inxi collects requires root privileges.

iwconfig Displays information about WLAN connections.
lsblk list block devices such as hard drives and their partitions.
lspci lists all discovered PCI devices

lspci | grep -i Network ( or "Wireless" or "WLAN" ) >> displays WLAN devices

lsusb lists all detected USB devices.
rfkill Tool for radio modules such as Wifi, Bluetooth etc.

rfkill list all >> lists the states of all radio modules
rfkill unblock all >> unblocks all soft-blocked devices
"softblocked" = switched off by the operating system
"hardblocked" = blocked by a switch or the UEFI

Unlock a hard-blocked device:

  • Looking for a hardware switch for Wifi,
  • looks for a function key for Wifi, usually together with the Fn key on the keyboard,
  • checks whether the device is blocked in the UEFI/BIOS.
(sudo) shred Tool to securely wipe devices or partitions

sudo shred /dev/sdX -v -f -n 2 >> overwrites sdX 2 times
Shred overwrites every single byte of the target device, which can take a very long time.
Make sure that the correct target hard drive is specified when entering the command!

sudo Command to get root permissions

There is no sudo password set up in Labtix, so entering a password is not required.

wipefs Quick deletion of file systems

sudo wipefs -a -f /dev/sdX >> wipes the file system of sdX
Make sure that the correct target hard drive is specified when entering the command!
This is not a safe method for wiping devices, but rather a quick and non-complete solution if you want to reset an installed system. Uses the shred command to securely delete

xkill Tool to close windows that don't respond

Open a terminal, type “xkill” and press “Enter”. The mouse cursor is displayed as a skull. Left-click the skull in the window you want to close. Xkill only closes windows. In some cases, processes started by the terminated window continue to run in the background.
Don't click on the desktop, if there is also a window!!!

xrandr Tool for setting the graphical (X) server

xrandr --output eDP-1 --scale 0.5x0.5 >> reduces the height and width resolution of the output eDP-1 by a factor of 0.5. Very useful if the screen has a very high resolution.
This is how you get the name of the actual output:
xrandr | grep primary

Continue reading to the next page:
Labtix 1 [archive]

Go back to read the previous page:
Labtix boot setting and persistence