1Password
Ensure you have run eval $(op signin) in your current terminal session so Ansible can fetch the password.
Copy files between machines
- rsync -avzP
/Downloads/houba.zip username@hostname:/migration/
Create user and grant Sudo privileges
- sudo adduser username && sudo usermod -aG sudo username
SSH
- ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no myuser@hostname
- ssh-copy-id -f -i ~/.ssh/ops.pub root@172.30.30.235
- cat ~/.ssh/ops.pub | ssh ops@houba ‘mkdir -p ~/.ssh && cat » ~/.ssh/authorized_keys’ Install Zsh
- sudo apt install zsh -y
- chsh -s /bin/zsh
- curl -sS https://starship.rs/install.sh | sh
Minimal /home/ops/.config/starship.toml
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Add a newline at the start of the prompt
add_newline = true
# Use custom symbols for the prompt
[character]
success_symbol = "[➜](bold green)"
error_symbol = "[➜](bold red)"
[hostname]
ssh_only = false
format = "on [$hostname](bold yellow) "
disabled = false
[username]
style_user = "white bold"
style_root = "black bold"
format = "user [$user]($style) "
disabled = false
[directory]
truncation_length = 3
truncation_symbol = "…/"Install Eza
sudo mkdir -p /etc/apt/keyrings<– Create the keyring directorywget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg<– Download the GPG keyecho "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list<– Add the repository to your sources listsudo apt update && sudo apt install -y eza<– Update and install
On a Proxmox host or container, you can force a DHCP renewal with:
On the Proxmox host itself (Debian-based):
# Release and renew
dhclient -r <interface>
dhclient <interface>Or if using systemd-networkd:
networkctl renew <interface>Inside an LXC container:
Same commands apply depending on what’s managing networking inside the container. If it’s a Debian/Ubuntu container:
dhclient -r eth0
dhclient eth0Or restart the networking service entirely:
systemctl restart networkingFor a VM (QEMU/KVM):
You’d need to do it from inside the guest OS — Proxmox doesn’t control the guest’s DHCP client directly.
If you changed the DHCP reservation on your UniFi side and want the device to pick up the new IP, the fastest approach is:
- Release the old lease:
dhclient -r <interface> - Optionally clear any cached lease file:
rm /var/lib/dhcp/dhclient.<interface>.leases - Request a new lease:
dhclient <interface>
Since you’re running UniFi, you can also delete the old lease/fixed IP mapping from the UniFi controller to make sure the server hands out the correct address on the next request.
Download and burn ISO
Download Debian AMD64 ISO File
Balena Etcher and Rufus offer simple interfaces to select your ISO and target USB drive and handle the writing process.
Use case:
- Create USB installation media from bootable ISOs
- Flash a BIOS or a firmware with a low-level utility
- Format USB, flash card and virtual drives to FAT/FAT32/NTFS/UDF/exFAT/ReFS/ext2/ext3
| Name | Differentiators | Web Site | |
|---|---|---|---|
| Balena Etcher | Support Linux, macOS, and Windows | Web + GitHub/balena-io/etcher | |
| Rufus | * Create Windows 11 installation drives for PCs that don’t have TPM or Secure Boot | Web + GitHub/pbatard/rufus |
Shutdown & restart
Restart: shutdown -r now
Shutdown: systemctl poweroff, shutdown -h now, or poweroff
System config
uname -a
sudo inxi -Fzfastfetch1
- hostnamectl
- sudo apt list –installed
- free -m
- cat /proc/meminfo
Show current memory use in megabytes: free -m
Change hostname
sudo hostnamectl set-hostname server1 sudo hostnamectl set-hostname “Vivek’s Thinkpad” –pretty sudo vi /etc/hosts / Edit the file /etc/hosts and update entries:
VIM
https://stackoverflow.com/questions/8980410/cut-and-paste-multiple-lines-in-vimStorage
To list all disks with all their defined partitions, along with the size lsblk and df -mNetwork
List network interfaces: `ip link show`Show your default gateway and routing tables: ip route | column -t
USB
list details all USB and PCI buses and devices lsusb;lspciSamba
vi /etc/samba/smb.conf [global] workgroup = d5e.dev # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%mCap the size of the individual 10g files (in KiB).
max log size = 1000
We want Samba to only 10g to /var/1og/samba/log. ismbd, nmbd}.
Append syslog@1 if you want important messages to be sent to syslog too.
logging = file
Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
[music] comment = Stored music (Roon) read only = no path = /media/music guest ok = no browseable = yes valid users = bhdicaire
[mbak] comment = Stored music (Roon) read only = no path = /media/mbak/ guest ok = no browseable = yes valid users = bhdicaire
[classic] comment = Stored music (Roon) read only = no path = /media/classic guest ok = no browseable = yes valid users = bhdicaire
-
On Debian, a system summary (ASCII logo + hardware / OS info) is done with fastfetch (successor to neofetch) ↩︎