Created
June 3, 2019 23:13
-
-
Save UltimateByte/e7fb6d9f40cd685ef2ff18d61e3f03ca to your computer and use it in GitHub Desktop.
Debian first things after install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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