Home Linux
Post
Cancel

Linux

Distributions

Arch Linux

get iso

If you want a graphical install or install without manuall partitioning you can use the install script by typing archinstall or use EndeavourOS
Arch Linux is a Linux distribution for computers based on the x86-64 architecture. It is a rolling release distribution, which means that it does not have a release cycle. Instead, new versions of packages are released as soon as they are ready. This allows Arch Linux to always be up-to-date but also means that it is not as stable as other distributions and you can break it if you don’t know what your doing.
You may have to change the keyboard layout.

1
loadkeys de

To change it permanently edit /etc/vconsole.conf and add KEYMAP=de to it.

Installation over wifi

You can check if the WiFi is blocked by running rfkill list.
If it says Soft blocked: yes, then run rfkill unblock wifi

After unblocking the WiFi, you can connect to it. Go through these 5 steps:

  • Run iwctl
  • Run device list, and find your device name.
  • Run station [device name] scan
  • Run station [device name] get-networks
  • Find your network, and run station [device name] connect [network name], enter your password and run exit. You can test if you have internet connection by running ping github.com, and then Press Ctrl and C to stop the ping test.

Package Manager

  • update all packages sodp pacman -Syu --noconfirm
  • install a package sudo pacman -S --noconfirm <package>
  • remove a package sudo pacman -R --noconfirm <package>
  • list installed packages pacman -Q
  • search for a package pacman -Ss <package>

You can add --noconfirm to execute without confirmation.
If you want to install a package from the AUR (like vscode) you can use yay or paru.

Debian

get iso

Debian is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project. The Debian Project was first announced on August 16, 1993 by Ian Murdock. The Debian stable distribution is maintained by the Debian Stable Release Team. It is the most popular Linux distribution for servers. It is stable and secure, but most of the time it is not the latest version of the software.

Package Manager

  • update all packages sudo apt update && sudo apt upgrade -y
  • install a package sudo apt install -y <package>
  • remove a package sudo apt remove -y <package>
  • list installed packages dpkg -l
  • search for a package apt search <package>

You can add -y to execute without confirmation.

Fedora

get iso

Fedora is a Linux distribution developed by the community-supported Fedora Project and owned by Red Hat. It is a free and open-source operating system based on the Linux kernel and GNU packages. It is sponsored by Red Hat and is a part of the Red Hat Enterprise Linux family. It is the most popular Linux distribution for desktops. It is stable and secure.

Package Manager

  • update all packages sudo dnf update && sudo dnf upgrade -y
  • install a package sudo dnf install -y <package>
  • remove a package sudo dnf remove -y <package>
  • list installed packages rpm -qa
  • search for a package dnf search <package>

You can add -y to execute without confirmation.

NixOS

get iso

NixOS is a Linux distribution based on the Nix package manager. It is a free and open-source operating system that is declarative, purely functional, and multi-user. The entire system is configured in a configuration file with makes it easy to reproduce and share. It is stable, secure and up to date.

Package Manager

  • update all packages nix-env -u
  • install packages nix-env -iA nixos.<packagename>
  • erase packages nix-env -e <packagename>
  • list installed packages nix-env -q
  • search for a package nix-env -qaP | grep <packagename>

You can use the nix packagemanager seperatlly from NixOS on all Unix based OS.

search nix packages
nix packagemanager

sudo

Repeat last command with sudo

1
sudo !!

ssh

ssh into a server

1
ssh username@server_ip

ssh into a server with a specific port

1
ssh -p 2222 username@server_ip

send a command to a server

1
ssh username@server_ip "ls"

send a file to a server

1
scp file.txt username@server_ip:/home/username/

get a file from a server

1
scp username@server_ip:/home/username/file.txt .

sshpass

sshpass into a server

1
sshpass -p "password" ssh username@server_ip

send a command to a server with sshpass

1
sshpass -p "password" ssh username@server_ip "ls"

send file to a server with sshpass

1
sshpass -p "password" scp file.txt username@server_ip:/home/username/

virsh

virsh is a command line tool for managing virtual machines.
It is part of the libvirt package.

virsh list

1
virsh list --all

virsh start

start a virtual machine

1
virsh start vm_name

virsh shutdown

shutdown a virtual machine

1
virsh shutdown vm_name

virsh destroy

destroy a virtual machine

1
virsh destroy vm_name

virsh undefine

undefine a virtual machine (remove it from the list)

1
virsh undefine vm_name

virsh console

connect to the console of a virtual machine

1
virsh console vm_name

virsh create snapshot

create a snapshot of a virtual machine

1
virsh snapshot-create-as vm_name snapshot_name

virsh snapshot-list

list all snapshots of a virtual machine

1
virsh snapshot-list vm_name

virsh snapshot-revert

revert a virtual machine to a snapshot

1
virsh snapshot-revert vm_name snapshot_name

virsh snapshot-delete

delete a snapshot of a virtual machine

1
virsh snapshot-delete vm_name snapshot_name
This post is licensed under CC BY 4.0 by the author.