Debian Linux

Download Debian AMD64 ISO File

Debian Cheat Sheet

Become a root

  • sudo -s
  • su -

restart

  • shutdown -r now

shutdown

  • systemctl poweroff
  • shutdown -h now
  • poweroff

System config

  • hostnamectl
  • sudo apt list –installed
  • free -m
  • cat /proc/meminfo

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:

How to change hostname on Debian 12/11/10 Linux

https://stackoverflow.com/questions/8980410/cut-and-paste-multiple-lines-in-vim


Current Configuration

Search packages: apt-cache search name, par exemple apt-cache search lshw Get information about the package: apt-cache show lshw;apt-cache showpkg lshw;dpkg -L lshw

ip a: 192.168.1.116 Current BIOS Configuration apt-cache search dmidecode uname -a lscpu

lspci | grep -i vga and then lspci -v -s 00:02.0

show current memory use in megabytes free -m

To list all disks with all their defined partitions, along with the size lsblk and df -m

list details all USB and PCI buses and devices lsusb;lspci

list network interfaces ip link show

show your default gateway and routing tables ip route | column -t

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.%m

Cap 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