Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debian first things after install
# Update the system
apt update && apt upgrade
# Add 32 bit architecture support (game servers)
dpkg --add-architecture i386 && apt update
# Install basic packages
apt install nano wget zip unzip bzip2 linux-kernel-headers tmux ca-certificates curl locales
# Reminder: sources for apt are in: /etc/apt/sources.list
# Chaning hostname
hostname #insernamehere
nano /etc/hostname
nano /etc/hosts
shutdown -r now
# Language and accents
# Allows for language options
apt install locales
# Know current locales
locales
# Reconfigure locales (change language)
dpkg-reconfigure locales
# Use en_US.UTF8, other ones are useless
# Change your timezone
dpkg-reconfigure tzdata
# Edit your MOTD
nano /etc/motd
# Network settings
nano /etc/network/interfaces
nano /etc/resolv.conf
# Get text color as root
# As root:
nano /root/.bashrc
# Uncomment these lines
export LS_OPTIONS=’–color=auto’
eval “`dircolors`”
alias ls=’ls $LS_OPTIONS’
alias ll=’ls $LS_OPTIONS -l’
alias l=’ls $LS_OPTIONS -lA’
# Run .bashrc
bash /root/.bashrc
# Security
# Hide process from a user to another
mount -o remount,rw,hidepid=2 /proc
# Make this permanent
nano /etc/fstab
# Add (or edit) this line
proc /proc proc defaults,hidepid=2 0 0
# Create a new user
adduser whateveryouwant
# Then disallow root login
nano /etc/ssh/sshd_config
PermitRootLogin no
# Or if you setup SSH keys
PermitRootLogin without-password
# You can change SSH port
Port =/= 22
# See who connected last
PrintLastLog yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment