Basic tools and libraries that might be useful
apt update && apt upgrade
apt install bash-completion && . /etc/bash_completion && echo . /etc/bash_completion >> .bashrc
apt install mc net-tools apt-transport-https aptitude wget ca-certificates curl git vlan htop ssh nano sudo dirmngr software-properties-common nfs-common cifs-utils samba-client
( https://unix.stackexchange.com/questions/37069/what-is-the-difference-between-and-when-chaining-commands )
cmd1; cmd2 cmd1 && cmd2
echo #CoChcemeVlozit > soubor.txt
echo #CoChcemeVlozit >> soubor.txt
Zobraz uživatele
cat /etc/passwd
Zobraz pouze uživatele, bez dalších informací (jako UID apod.)
awk -F':' '{ print $1}' /etc/passwd
To check free space | https://shapeshed.com/unix-du/
du -chs /var/www
show databases;
use nameofdatabase;
show tables;
Vytvoření souboru pro klíče, které budou povoleny
mkdir .ssh && nano .ssh/authorized_keys
Obecně: ssh-rsa KLIC jmeno@prijmeni
ssh-rsa 1234567890AbCdEf jan@stepanek
ssh-ed25519 aBcDeF1234567890 stepi@homepc