Update system
# Debian
apt update
# Fedora
dnf update
Install most used tools
# Debain
apt install -y neofetch htop tree ncdu ranger zsh vim neovim git curl wget lsd
# Fedora
dnf install -y neofetch htop tree ncdu ranger zsh vim neovim git curl wget lsd
Create sudo user
# Debian
adduser aimerneige
usermod -aG sudo aimerneige
# Fedora
useradd -G wheel aimerneige
passwd aimerneige
Test root privileges
su - aimerneige
sudo cat /etc/shadow
Setup SSH public key
# run this on your local machine
ssh-copy-id aimerneige@server
Test if you can connect to server
ssh aimerneige@server
Disable root and password login
sudo vim /etc/ssh/sshd_config
- Set
PermitRootLogin
asno
To disableroot
login - Set
PasswordAuthentication
adno
To disable password login
Skip password for sudo
sudo visudo
Add this on the end of file:
aimerneige ALL=(ALL) NOPASSWD:ALL
Delete other user that provider created
sudo deluser default
Warning
Do not delete the root user.
Restart your server
sudo reboot
Other config
Setup zsh config
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Update config from github (Use your own config file!!!!!)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/aimerneige/zsh/master/install.sh)"
# Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Install k
git clone https://github.com/supercrabtree/k $ZSH_CUSTOM/plugins/k
# Install starship
curl -sS https://starship.rs/install.sh | sh
Setup neovim config
rm -rf ~/.config/nvim
# Use your own config file!!!!!
git clone git@github.com:aimerneige/nvim.git ~/.config/nvim