2.3 KiB
2.3 KiB
Linux Setup
Brief
some setup guides
- by
rskntrooton2025-02-20
Preferences
SSH
sudo -i
cd /etc/ssh/
mv sshd_config sshd_config.backup
curl https://raw.githubusercontent.com/k4yt3x/sshd_config/master/sshd_config -o ./sshd_config
chmod 644 /etc/ssh/sshd_config
cat <<%% >> /etc/ssh/sshd_config
# Enable Public Key Auth
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
%%
systemctl restart ssh
exit
Auth
=== "Existing Key"
``` bash
key="ecdsa-sha2-nistp256 ASASDASDFsomekey user@whatever"
```
``` bash
mkdir -p ~/.ssh && echo ${key} >> ~/.ssh/authorized_keys
```
=== "New Key"
``` bash
ssh-keygen -t ecdsa
cat id_ecdsa.pub >> ~/.ssh/authorized_keys
```
Docker
sudo -i
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
usermod -aG docker ${SOME_USER}
docker ps
Completion
=== "docker"
``` bash
mkdir -p ~/.local/share/bash-completion/completions
docker completion bash > ~/.local/share/bash-completion/completions/docker
source ~/.bashrc
```
=== "bash"
``` bash
sudo apt install bash-completion -y
```
``` bash
cat <<%% >> ~/.bashrc
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
%%
```
Tools
=== "Debian"
``` bash
sudo apt install -y \
curl \
htop \
iputils-ping \
jq \
tcpdump \
traceroute \
vim
```
=== "Fedora"
``` bash
sudo dnf install -y \
htop \
sensors
```
Shortcuts
fastfetch
- see fastfetch for more info
url="https://github.com/fastfetch-cli/fastfetch/releases/download/2.47.0/fastfetch-linux-amd64.deb"
mkdir -p ~/downloads/ && cd ~/downloads
curl -fsSL ${url} -o fastfetch.deb
sudo dpkg -i ./fastfetch.deb
Profile
cat <<%% >> ~/.bashrc
# RSKIO
alias ..="cd .."
alias ...="cd ..."
alias q="exit"
alias ff="fastfetch"
%%
source ~/.bashrc