User Tools

Site Tools


operating_systems:debian

This is an old revision of the document!


Debian GNU/Linux

Topics:

Common setup stuff

  • Install VirtualBox Guest Additions (for VM only): apt install build-essential linux-headers-$(uname -r) then run VBoxLinuxAdditions.run from the disk. There is also a copy of the ISO in the Debian non-free repository. You might need to do sudo su - to get a “true root” shell, otherwise it might install the drivers under the wrong low-privilege user.
  • Setting up disk partitions (partition, encrypt, THEN LVM?? yep!) – execute shell and do vgremove my-volume-group and vgremove –removemissing my-volume-group if it gets into a bad state.
  • Installing firmware (apt-get download firmware-iwlwifi or download from https://packages.debian.org/buster/all/firmware-iwlwifi/download for X220 drivers.) then simply install with sudo dpkg -i firmware-iwlwifi - Or download the releases with non-free firmware included (easiest) - The firmware collection download is just all the .deb packages inside a folder named firmware/, if you have that on a usb stick when you install it can use them. or install manually afterwards - on desktop ROG motherboard: sudo dpkg -i firmware-realtek
  • Mount USB drives with mount and list them with dmesg
  • Make laptop lid close do nothing - edit /etc/systemd/login.conf and set HandleLidSwitchExternalPower=ignore or HandleLidSwitch=ignore
  • Check battery level on CLI only (cat /sys/class/power_supply/BAT0/capacity{,_level}') or upower -i /org/freedesktop/UPower/devices/battery_BAT0, or use sudo apt install acpitool and run acpitool.
  • Setup custom grub boot script (curl mygist > /etc/grub.d/99_danostheme; sudo update-grub
  • Change console fonts with sudo dpkg-reconfigure console-setup
  • edit apt sources with sudo apt edit-sources and add right repos whether DVD or remote
  • set visudo to use vim with sudo update-alternatives –config editor
  • set sudo nopassword with sudo visudo and set %sudo ALL=NOPASSWD:ALL on the line
  • add user to sudo group gpasswd -a sudo myuser
  • change which desktop starts up when running startx: echo “exec gnome-session” > ~/.xinitr or exec openbox-session (sudo apt install openbox)
  • setup disks to auto-mount with `/etc/fstab` entries
  • Change default shell to zsh (which zsh; chsh) - Customizing Zsh: https://www.youtube.com/watch?v=0yPj-BfGRug
  • Add any custom debian repos - finding closest/fastest mirror, other repos like Sublime Text
  • Mount an SMB share with CIFS: sudo apt install cifs-utils; sudo mount -t cifs -o uid=dano,gid=sudo,user=dano,password=“my password” \\\\10.0.0.99\\home /mnt and just chmod/chown it as necessary. - My imount script to help mount stuff easier
  • Add mount to the fstab for permanent mounting /etc/fstab (or make my script imount to get my password and mount when I login
  • Install openbox and put exec openbox-session in ~/.xinitrc to use openbox.
  • How to set hostname and use Synology DNS? https://wiki.debian.org/NetworkConfiguration#Defining_the_.28DNS.29_Nameservers - Add `nameserver 1.2.3.4` to `/etc/resolve.conf`
  • Customize GRUB (colors, background, timeout). See GRUB page for video, theme file, and instructions.
  • Setup fail2ban with sudo apt install fail2ban
  • Play DVDs by installing vlc and libdvdcss2.
  • Rip DVDs using handbrake with libdvdcss2 or use vlc and choose File → Convert/Stream
  • Convert .m4v video to .ogg video with ffmpeg -i x.m4v x.ogg
  • Extract audio only from a video with ffmpeg -i x.m4v -vn x.ogg
  • Play PC speaker beep: `echo -ne '\007'` or `sudo apt install beep; beep`
  • See what ports/sockets are listening with `netstat` and commonly `netstat -ntlp` (`sudo apt install net-tools)`
  • Use `nslookup` to find IP of a hostname (`sudo apt install dnsutils`)
  • Repeat a program and view output with `watch -n3 something`
  • Use `vlc` or `easytag` to edit metadata on a song/video file.
  • Install Qt5 libraries, QtCreator IDE and UI Designer with `apt install qt5-default qtcreator`. Run with `qtcreator`. Run designer with `/usr/lib/qt5/bin/designer`
  • List Java versions and change with update-alternatives e.g. sudo update-alternatives –list java and sudo update-alternatives –config java

Must have packages

  • mutt
  • mc
  • keepassx
  • vim
  • default-jdk / openjdk-11-jdk
  • net-tools (netstat)
  • dnsutils (nslookup)
  • neofetch
  • tmux
  • elinks
  • curl,wget,git
  • handbrake (ripping and decrypting dvds)
  • vlc
  • libdvdcss2 (to watch encrypted dvds) and then `sudo dpkg-reconfigure libdvd-pkg`
operating_systems/debian.1647194810.txt.gz · Last modified: 2022/03/13 18:06 by nanodano