131 lines
2.6 KiB
Markdown
131 lines
2.6 KiB
Markdown
# Extra Repos
|
|
|
|
```sh
|
|
dnf update
|
|
dnf install epel-release
|
|
dnf install elrepo-release
|
|
dnf install rpmfusion-free-release
|
|
```
|
|
|
|
# System tools
|
|
|
|
```sh
|
|
dnf groupinstall "Development tools"
|
|
dnf install vim git zip htop iftop btop hdparm stress
|
|
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
|
|
dnf install nodejs
|
|
```
|
|
|
|
# System test
|
|
|
|
```sh
|
|
btop
|
|
stress -c 4 -i 2 -d 1
|
|
```
|
|
|
|
# Oh My Posh
|
|
|
|
```sh
|
|
curl -s https://ohmyposh.dev/install.sh | bash -
|
|
mkdir -p .config/oh-my-posh/themes
|
|
wget -P .config/oh-my-posh/themes https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/capr4n.omp.json
|
|
wget -P .config/oh-my-posh/themes https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/aliens.omp.json
|
|
wget -P .config/oh-my-posh/themes https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/capr4n.omp.json
|
|
echo 'eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/themes/capr4n.omp.json)"' >> ~/.bashrc
|
|
exec bash
|
|
```
|
|
|
|
# FZF
|
|
|
|
```sh
|
|
dnf -y install fzf fd-find bat
|
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
|
~/.fzf/install
|
|
# Ctrl-t find files / directories
|
|
# Ctrl-r find in history
|
|
# Alt-c change directory
|
|
# kill -9 **TAB autocomplete option
|
|
```
|
|
|
|
# Encrypted Partition
|
|
|
|
```sh
|
|
# Create encrypted partition
|
|
dnf install cryptsetup
|
|
cryptsetup -y -v --type luks2 luksFormat /dev/nvme0n1p6
|
|
lsblk -f
|
|
|
|
# Mount luks
|
|
cryptsetup luksOpen /dev/nvme0n1p6 data
|
|
ls -l /dev/mapper/data
|
|
cryptsetup -v status data
|
|
cryptsetup luksDump /dev/nvme0n1p6
|
|
|
|
# Format ext4
|
|
dd if=/dev/zero of=/dev/mapper/data status=progress
|
|
mkfs.ext4 /dev/mapper/data
|
|
|
|
# Mount ext4
|
|
mkdir /data
|
|
mount /dev/mapper/data /data
|
|
df -h
|
|
ls -l /data
|
|
|
|
# Umount all
|
|
umount /data
|
|
cryptsetup luksClose data
|
|
```
|
|
|
|
# Change docker data Directory
|
|
|
|
```sh
|
|
docker info -f '{{ .DockerRootDir }}' # /var/lib/docker
|
|
systemctl stop docker.socket
|
|
systemctl stop docker
|
|
echo '{"data-root": "/data/docker"}' > /etc/docker/daemon.json
|
|
systemctl start docker
|
|
systemctl start docker.socket
|
|
docker info -f '{{ .DockerRootDir }}' # /data/docker
|
|
mv /var/lib/docker /var/lib/docker.old
|
|
```
|
|
|
|
# Enable rc.local
|
|
|
|
`/etc/rc.local`
|
|
|
|
```sh
|
|
#!/bin/bash
|
|
# Add terminal commands here without sude
|
|
|
|
# Make sure the script will "exit 0" on success
|
|
# or any other value on error.
|
|
exit 0
|
|
```
|
|
|
|
`/etc/systemd/system/rc-local.service`
|
|
|
|
```sh
|
|
[Unit]
|
|
Description=/etc/rc.local Compatibility
|
|
ConditionPathExists=/etc/rc.local
|
|
|
|
[Service]
|
|
Type=forking
|
|
ExecStart=/etc/rc.local start
|
|
TimeoutSec=0
|
|
StandardOutput=tty
|
|
RemainAfterExit=yes
|
|
SysVStartPriority=99
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
```sh
|
|
chmod +x /etc/rc.local
|
|
systemctl enable rc-local
|
|
systemctl start rc-local.service
|
|
systemctl status rc-local.service
|
|
```
|
|
|