Skip to content

Instantly share code, notes, and snippets.

@jasyuiop
Last active March 9, 2023 21:56
Show Gist options
  • Save jasyuiop/075b4f41f9e5a44c797335958574629b to your computer and use it in GitHub Desktop.
Save jasyuiop/075b4f41f9e5a44c797335958574629b to your computer and use it in GitHub Desktop.
Fedora Post-Install

Dnf parallel download

$ sudo vim /etc/dnf/dnf.conf
max_parallel_downloads=10

Packages

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
$ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
$ dnf check-update

$ sudo dnf install git wget curl zsh tmux gparted p7zip unzip p7zip-plugins unrar htop neofetch vim util-linux-user libreoffice-langpack-tr syncthing lm_sensenors rust cargo rustfmt golang 

$ flatpak install com.discordapp.Discord org.telegram.desktop org.qbittorrent.qBittorrent org.videolan.VLC org.gimp.GIMP
io.podman_desktop.PodmanDesktop md.obsidian.Obsidian org.avidemux.Avidemux org.kde.kdenlive com.obsproject.Studio fr.handbrake.ghb org.darktable.Darktable org.kde.krita org.inkscape.Inkscape org.blender.Blender org.audacityteam.Audacity com.github.tchx84.Flatseal com.usebottles.bottles net.agalwood.Motrix fr.romainvigier.MetadataCleaner network.loki.Session org.bleachbit.BleachBit org.signal.Signal
	# Gerekli gördüklerini yükle.

$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
$ sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
$ dnf check-update
$ sudo dnf install code

Virualization

$ sudo dnf group install --with-optional virtualization
$ sudo systemctl start libvirtd
$ sudo systemctl enable libvirtd

Configuration Install

$ ssh-keygen -t ed25519 -C "emrenefesli@outlook.com"
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_ed25519
$ cat ~/.ssh/id_ed25519.pub
	#githuba ekle
$ ssh -T git@github.com

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

$ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

	# Install scriptini çalıştır, githubdan repoyu çekip yerleştirsin.

	# Zsh default shell olmaz ise -> chsh -s $(which zsh)

Dotfiles Install Script

#!/bin/bash
git clone --bare git@github.com:jasyuiop/dotfilesForMyPC.git $HOME/.cfg
function dotfiles {
   /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
dotfiles checkout
if [ $? = 0 ]; then
  echo "Checked out config.";
  else
    echo "Backing up pre-existing dot files.";
    dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
fi;
dotfiles checkout
dotfiles config status.showUntrackedFiles no

Syncthing

$ systemctl --user enable syncthing.service
$ systemctl --user start syncthing.service

Bluetooth (Airpods pairing problem)

$ sudo vim /etc/bluetooth/main.conf
	# Editle
ControllerMode = bredr

$ sudo systemctl restart bluetooth

Font Install

$ sudo mkdir -p /usr/local/share/fonts/MesloLGS
$ sudo cp * /usr/local/share/fonts/MesloLGS
$ sudo chown -R root: /usr/local/share/fonts/MesloLGS
$ sudo chmod 644 /usr/local/share/fonts/MesloLGS/*
$ sudo restorecon -RF /usr/local/share/fonts/MesloLGS
$ sudo mkdir -p /usr/local/share/fonts/CascadiaCode
$ sudo cp * /usr/local/share/fonts/CascadiaCode
$ sudo chown -R root: /usr/local/share/fonts/CascadiaCode
$ sudo chmod 644 /usr/local/share/fonts/CascadiaCode/*
$ sudo restorecon -RF /usr/local/share/fonts/CascadiaCode
$ sudo fc-cache -v

Codecs

$ sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel
$ sudo dnf install lame\* --exclude=lame-devel
$ sudo dnf group upgrade --with-optional Multimedia
$ sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld
$ sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld

$ sudo dnf config-manager --set-enabled fedora-cisco-openh264
$ sudo dnf install gstreamer1-plugin-openh264 mozilla-openh264
	# open Firefox, go to menu → Add-ons → Plugins and enable OpenH264 plugin.
	# check etmek için libva-utils yükleyip vainfo ile bakılabilir.

SSH

$ sudo systemctl start sshd
	# macte -> 
$ ssh-copy-id -i .ssh/id_ed25519.pub jasyuiop@192.168.1.20

$ sudo vim /etc/ssh/sshd_config
#
 Port 22
 PermitRootLogin no
 PubkeyAuthentication yes
 PasswordAuthentication no
#
$ sudo systemctl restart sshd
$ sudo systemctl enable sshd

SSH Config

Host *
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_ed25519

Gnome Extensions

https://extensions.gnome.org/extension/615/appindicator-support/

Other useful stuffs ->

Zero-fill format

	# random veriler yazarak 3 kez geçer
$  sudo shred -v /dev/sdX

	# 2 kez geçerek zero-fill atar
$  sudo shred -n 2 -z -v /dev/sdX

	# zero fill atar
$ dd if=/dev/zero of=/dev/sdX bs=4096 status=progress

	# ssd/flash bellek tarzı şeylere atıyorsan 1 geçiş kullan.
$ sudo shred -n 1 -v /dev/sdX

Samba

https://docs.fedoraproject.org/en-US/quick-docs/samba/

Flatpak Discord Update Problem

# Eğer discord gücelleme var deyip .deb ve .tar.gz paket indirmeye çalışırsa ->
$ sudo vim /var/lib/flatpak/app/com.discordapp.Discord/current/active/files/discord/resources/build_info.json
	# version'u en güncel sürüm olarak editle.

Flatpak Cleanup

$ flatpak uninstall --unused
$ sudo rm -rfv /var/tmp/flatpak-cache-*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment