Helpful commands (shell, terminal)

×

Statusmeldung

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 comnands (shell, terminal)

To open a terminal click on the terminal icon in the menu bar or press the keys Ctrl and Alt and t.

If access to a command is denied ("permission denied") or root rigts are needed, add "sudo" in front of the command to be used, e.g. "sudo zzzfm"

For more information use the --help option e.g. "apt --help"

======================================================================
acpi (-V) >> information about the powersystem like battery-state, battery-condition etc.

======================================================================
(sudo) apt >> package manager

Usage:

sudo apt update >> create the needed package database
sudo apt install mousepad >> installs the program "mousepad"

Only usefull in the persistence mode. The device must be connected to the internet.

======================================================================
eject -T >> ejects CDs or DVDs

======================================================================
grep >> filters the output of commands

acpi -V | grep -i battery >> shows only the lines of acpi -V wich contain the term "battery"

======================================================================
(sudo) inxi >> system information

sudo inxi -v 5 >> informations with verbosity level 5 (1-8 possible)
inxi -B >> battery information
sudo inxi -M >> informations about the system
inxi -m >> informations about the memory

Sudo is only needed if informations inxi gathers need root permissions

======================================================================
iwconfig >> shows informations about wireless connections

======================================================================
lsblk >> lists blockdevices like harddisks

======================================================================

======================================================================
lspci >> lists all recognized pci-devices

lspci | grep -i Network ( or Wireless or WLAN ) >> shows Wifi-devices

======================================================================
lsusb >> lists all recognized USB-devices

======================================================================
rfkill >> tool for radio devices

rfkill list all >> lists the states of all radio devices
rfkill unblock all >> unblocks all softblocked devices

To unblock a hardblocked device:

- look for a hardware switch
- look for a keyboard function/binding
- look if the device is blocked in the UEFI/BIOS

======================================================================
(sudo) shred >> tool to securely delete devices or partitions

Usage:

sudo shred /dev/sdX -v -f -n 2 >> overwrites sdX 2 times

Shred will overwrite each single byte of the target device, so it might take a long time.

BE CAREFUL !!! BE SURE TO USE THE PATH TO THE DEVICE/PARTITION YOU REALLY WANT TO CLEAN !!!

======================================================================
sudo >> command to get root permissions

In labtix no sudo-password is installed, so typing in a password is not needed

======================================================================
wipefs >> tool to delete filesystems

Usage:

sudo wipefs -a -f /dev/sdX >> wipes the filesystem of sdX

BE CAREFUL !!! BE SURE TO USE THE PATH TO THE DEVICE / PARTITION YOU REALLY WANT TO CLEAN !!!

This is not a secure method of deleting any devices, it's the quick and dirty solution if you want to get rid of an installed system. For safe deletions use the command "shred"

======================================================================
xkill >> tool to kill windows that are not responsible

Usage:

Open a terminal, type "xkill" and press "Enter". The mousepointer will be shown as a skull. Leftclick with the skull inside the window you want to close. Xkill will only close windows. In some cases processes started by the killed window might still run in the background.

Do not click on the Desktop, it is a window too !!!

======================================================================
xrandr >> tool to manipulate the graphical-(x-)server

xrandr --output eDP-1 --scale 0.5x0.5 >> reduces the height and width resolution of output eDP-1 by the factor 0.5 . Very useful if the screen has a very high resolution.

To get the name of the actual output:

xrandr | grep primary

======================================================================


Continue reading to the next page:
Dual boot MacOS and Ubuntu


Go back to read the previous page:
UEFI Boot only or BIOS locked and UEFI set