Wrigs

setup-fedora.sh

Nov 26th, 2022 (edited)
1,326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.32 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # Speed up DNF:
  4. sudo nano /etc/dnf/dnf.conf
  5. # Add the following:
  6. fastestmirror=True
  7. max_parallel_downloads=10
  8. defaultyes=True
  9. keepcache=True
  10.  
  11. cd ~/Downloads
  12.  
  13. sudo dnf upgrade -y
  14.  
  15. # Enable RPM Fusion
  16. # https://rpmfusion.org/Configuration
  17. sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  18.  
  19. sudo dnf groupupdate core
  20.  
  21. # FUSE Installation
  22. # FUSE (Filesystem in Userspace) is essential for AppImage functionality. If you’re experiencing issues with AppImages not running, you may need to install FUSE packages:
  23. yum install fuse fuse-devel #or
  24. sudo dnf install fuse fuse-libs  # These are not found in Fedora 42 - Cinnamon repos
  25. # Many users on Fedora 41 reported that AppImages stopped working until they installed these packages, and this requirement continues in Fedora 42.
  26. # Required Dependencies
  27. # While AppImages include most dependencies, some may rely on fundamental system libraries. The most common required packages are:
  28. sudo dnf install libfuse2 libfuse3  # These are not found in Fedora 42 - Cinnamon repos
  29.  
  30. # Adding Flatpaks
  31. # https://flatpak.org/setup/Fedora
  32. sudo dnf install flatpak
  33. flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
  34.  
  35. # Install Media Codecs
  36. sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
  37. sudo dnf groupupdate sound-and-video
  38.  
  39. # Change Hostname
  40. sudo hostnamectl set-hostname <New_Custom_Name>
  41.  
  42.  
  43. # ==============================================================================
  44. # If using Gnome DE
  45. # ==============================================================================
  46.  
  47. # Install Gnome Tweaks and Gnome Extensions
  48. sudo dnf install gnome-tweaks gnome-extensions-app
  49.  
  50. # Install Pop-Shell
  51. sudo dnf install gnome-shell-extension-pop-shell
  52.  
  53.  
  54. # ==============================================================================
  55. # General Utilities
  56. # ==============================================================================
  57.  
  58. # Install KeepassXC Password Manager
  59. sudo dnf install keepassxc
  60.  
  61. # Install Git
  62. sudo dnf install git
  63.  
  64. # Install Alacritty Terminal
  65. # Use apt instead of dnf if on Debian based distro
  66. sudo dnf install alacritty
  67. mkdir ~/.config/alacritty
  68. wget -O ~/.config/alacritty/alacritty.toml https://pastebin.com/raw/A1G58t6f
  69.  
  70. # Alacritty Themes
  71. mkdir -p ~/.config/alacritty/themes
  72. git clone https://github.com/alacritty/alacritty-theme ~/Downloads/alacritty_themes
  73. mv ~/Downloads/alacritty_themes/themes ~/.config/alacritty
  74. rm -rf ~/Downloads/alacritty_themes
  75.  
  76.  
  77.  
  78. # ==============================================================================
  79. # Install Rofi Program launcher and themes
  80. # ==============================================================================
  81.  
  82. sudo dnf install rofi
  83.  
  84. # Make Rofi themes directory
  85. mkdir -p ~/.config/rofi/
  86. mkdir -p ~/.local/share/rofi/themes/
  87.  
  88. # Clone Rofi theme collection and move to themes directory
  89. git clone https://github.com/lr-tech/rofi-themes-collection.git
  90. mv ./rofi-themes-collection/themes/*.rasi ~/.local/share/rofi/themes/
  91.  
  92. # Run Rofi Theme Selector
  93. # Find theme and press alt-a to select theme
  94. rofi-theme-selector
  95.  
  96.  
  97. # ==============================================================================
  98. # Install Ulauncher if using Gnome X-Org
  99. # ==============================================================================
  100.  
  101. sudo dnf install ulauncher
  102.  
  103. # Make Ulauncher themes directory
  104. mkdir -p ~/.config/ulauncher/user-themes/
  105.  
  106. # Clone ZorinBlue theme
  107. git clone https://github.com/NayamAmarshe/ulauncher-zorinBlueDark/ \
  108.   ~/.config/ulauncher/user-themes/zorin-blue-dark
  109.  
  110. # Clone Eigen-Dark theme
  111. git clone https://github.com/sotsugov/ulauncher-eigen/ \
  112.   ~/.config/ulauncher/user-themes/eigen-dark
  113.  
  114. # Clone Adwaita-Dark theme
  115. git clone https://github.com/gabrbrand/adwaita-dark-ulaucher.git \
  116. ~/.config/ulauncher/user-themes/adwaita-dark-ulaucher
  117.  
  118. # Clone Breeze-Dark theme
  119. git clone https://github.com/rifactor/breeze-dark-ulauncher \
  120.   ~/.config/ulauncher/user-themes/breeze-dark-ulauncher
  121.  
  122. # Clone Matcha-Dark-Azul theme
  123. git clone https://github.com/DaveHigs/Matcha-Dark-Azul-ulauncher.git \
  124.   ~/.config/ulauncher/user-themes/Matcha-Dark-Azul-ulauncher
  125.  
  126. # Clone Libadwaita-Dark theme
  127. git clone https://github.com/kareemkasem/ulauncher-theme-libadwaita-dark \
  128.   ~/.config/ulauncher/user-themes/libadwaita-dark
  129.  
  130.  
  131. # ==============================================================================
  132. # Install fonts for UI
  133. # ==============================================================================
  134.  
  135. # Install San Francisco Display (default for UI)
  136. cd ~/Downloads
  137. wget -O SFUIDisplay.zip https://www.dafontfree.io/wp-content/uploads/download-manager-files/1601920060wpdm_San-Francisco.zip
  138. unzip SFUIDisplay.zip -d SFUIDisplay
  139. sudo cp -r ./SFUIDisplay/'San Francisco'/SFUIDisplay /usr/share/fonts/SFUIDisplay
  140. rm -rf ./SFUIDisplay SFUIDisplay.zip
  141.  
  142. # Install Montserrat font
  143. sudo dnf install font-montserrat
  144.  
  145.  
  146. # ==============================================================================
  147. # Install monospace fonts
  148. # ==============================================================================
  149.  
  150. # Install JetBrains Mono
  151. sudo dnf install -y jetbrains-mono-fonts-all
  152.  
  153. # Install Hasklig font
  154. cd ~/Downloads
  155. wget -O Hasklig.zip https://github.com/i-tu/Hasklig/releases/download/v1.2/Hasklig-1.2.zip
  156. unzip Hasklig.zip -d Hasklig
  157. sudo cp -r ~/Downloads/Hasklig/OTF /usr/share/fonts/Hasklig
  158. rm -rf ~/Downloads/Hasklig Hasklig.zip
  159.  
  160. # Install JetBrains Mono font (manual)
  161. wget -O JetBrainsMono.zip https://download.jetbrains.com/fonts/JetBrainsMono-2.304.zip
  162. unzip JetBrainsMono.zip -d JetBrains
  163. sudo cp -r ./JetBrains/fonts/ttf /usr/share/fonts/JetBrainsMono
  164. rm -rf ~/Downloads/JetBrains JetBrainsMono.zip
  165.  
  166. # Install FiraCode font
  167. wget -O FiraCode.zip https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip
  168. unzip FiraCode.zip -d FiraCode
  169. sudo cp -r ./FiraCode/ttf /usr/share/fonts/FiraCode
  170. rm -rf ./FiraCode FiraCode.zip
  171.  
  172. # Install SF-Mono font (default monospace)
  173. cd ~/Downloads
  174. wget -O SF-Mono.zip https://github.com/supercomputra/SF-Mono-Font/archive/refs/heads/master.zip
  175. unzip SF-Mono.zip -d SF-Mono
  176. sudo cp ./SF-Mono/SF-Mono-Font-master /usr/share/fonts/SF-Mono
  177. rm -rf ./SF-Mono SF-Mono.zip
  178.  
  179.  
  180. # ==============================================================================
  181. # Install Nerd Fonts
  182. # ==============================================================================
  183.  
  184. # Code New Roman Nerd Font
  185. wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/CodeNewRoman.zip
  186. unzip CodeNewRoman.zip -d CodeNewRoman
  187. sudo cp -r ./CodeNewRoman /usr/share/fonts/CodeNewRoman
  188. rm -rf ./CodeNewRoman CodeNewRoman.zip
  189.  
  190. # Hack Nerd Font
  191. wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/Hack.zip
  192. unzip Hack.zip -d Hack
  193. sudo cp -r ./Hack /usr/share/fonts/Hack
  194. rm -rf ./Hack Hack.zip
  195.  
  196. # Meslo Nerd Font
  197. wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/Meslo.zip
  198. unzip Meslo.zip -d Meslo
  199. sudo cp -r ./Meslo /usr/share/fonts/Meslo
  200. rm -rf ./Meslo Meslo.zip
  201.  
  202. # Recursive Nerd Font
  203. wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/Recursive.zip
  204. unzip Recursive.zip -d Recursive
  205. sudo cp -r ./Recursive /usr/share/fonts/Recursive
  206. rm -rf ./Recursive Recursive.zip
  207.  
  208.  
  209.  
  210. # ==============================================================================
  211. # Programming
  212. # ==============================================================================
  213.  
  214. # Install general programming utilities
  215. sudo dnf install -y clang golang cmake git meld
  216.  
  217. # Install Sublime Text
  218. sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
  219. # Stable for Fedora 41/dnf5 or newer
  220. sudo dnf config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
  221. sudo dnf install sublime-text
  222.  
  223. # Install Visual Studio Code
  224. sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  225. echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
  226.  
  227. dnf check-update
  228.  
  229. sudo dnf install code # or code-insiders
  230.  
  231.  
  232. # Install VSCodium  (open source VSCode)
  233. wget https://github.com/VSCodium/vscodium/releases/download/1.73.1.22314/codium-1.73.1.22314-el7.x86_64.rpm
  234. sudo dnf install codium-1.73.1.22314-el7.x86_64.rpm
  235. rm codium-1.73.1.22314-el7.x86_64.rpm
  236.  
  237. # Install Geany
  238. sudo dnf install geany geany-plugins-addons geany-plugins-common geany-plugins-geanyctags geany-plugins-geanyvc \
  239. geany-plugins-latex geany-themes geany-plugins-autoclose geany-plugins-codenav geany-plugins-git-changebar \
  240. geany-plugins-lineoperations geany-plugins-markdown geany-plugins-overview
  241.  
  242.  
  243. # ==============================================================================
  244.  
  245. # install curl, if necessary
  246. sudo dnf install curl
  247.  
  248. # installs NVM (Node Version Manager)
  249. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
  250.  
  251. # download and install Node.js
  252. nvm install 20
  253.  
  254. # verifies the right Node.js version is in the environment
  255. node -v # should print `v20.12.0`
  256.  
  257. # verifies the right NPM version is in the environment
  258. npm -v # should print `10.5.0`
  259.  
  260. # install yarn with npm
  261. sudo npm install yarn -g
  262.  
  263. # install yarn using a bash script (preferred)
  264. curl -o- -L https://yarnpkg.com/install.sh | bash
  265.  
  266. # Install Github CLI
  267. # Install from GH package repository for immediate access to latest releases:
  268. sudo dnf install 'dnf-command(config-manager)'
  269. sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
  270. sudo dnf install gh --repo
  271.  
  272. # Alternatively, install from the community repository
  273. sudo dnf install gh
  274. # Upgrade
  275. sudo dnf update gh
  276.  
  277. # Install Docker
  278. curl -fsSL https://get.docker.com -o get-docker.sh
  279. sh get-docker.sh
  280. sudo usermod -aG docker $USER
  281.  
  282.  
  283. # ==============================================================================
  284. # Science, Math and Education
  285. # ==============================================================================
  286.  
  287. # Install R programming language only
  288. sudo dnf install R
  289.  
  290. # Install R programming language with dependencies
  291. sudo dnf install -y R-core R-core-devel R-java R-java-devel libRmath libRmath-devel
  292.  
  293. # If you have trouble compiling, you may also require some or all of these packages. This is situational:
  294. sudo dnf install libcurl-devel openssl-devel harfbuzz-devel fribidi-devel freetype-devel libpng-devel libjpeg-turbo-devel
  295.  
  296. # Install RStudio
  297. sudo dnf install -y rstudio-desktop
  298.  
  299. # sudo dnf install -y julia sagemath scilab
  300. sudo dnf install -y julia
  301.  
  302. # Essential packages for Jupyter Notebook
  303. sudo dnf install -y python3-notebook mathjax sscg
  304.  
  305. # Install additional and optional Python modules commonly used by data scientists
  306. sudo dnf install -y python3-seaborn python3-lxml python3-basemap python3-scikit-image python3-scikit-learn python3-sympy python3-dask+dataframe python3-nltk
  307.  
  308. # https://fedoramagazine.org/jupyter-and-data-science-in-fedora/
  309. # https://www.redhat.com/sysadmin/install-jupyterlab-linux
  310.  
  311. # Install Qalculate! - the ultimate desktop calculator
  312. sudo dnf install -y qalculate
  313.  
  314. sudo dnf install texlive-scheme-full
  315.  
  316.  
  317. # ==============================================================================
  318. # Web Browsers
  319. # ==============================================================================
  320.  
  321. # Install Waterfox Browser
  322. cd ~/Downloads
  323. wget https://github.com/WaterfoxCo/Waterfox/releases/download/G4.1.1.1/waterfox-G4.1.1.1.en-US.linux-x86_64.tar.bz2
  324. # https://cdn1.waterfox.net/waterfox/releases/G5.1/Linux_x86_64/waterfox-G5.1.tar.bz2
  325. tar -xvf waterfox-G4.1.1.1.en-US.linux-x86_64.tar.bz2
  326. sudo mv waterfox /opt/
  327. wget https://pastebin.com/raw/bYF8aqjr && sudo mv bYF8aqjr /usr/share/applications/Waterfox.desktop
  328.  
  329. # Install Google Chrome
  330. wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
  331. sudo dnf install -y google-chrome-stable_current_x86_64.rpm
  332.  
  333. # Install Brave Browser
  334. curl -fsS https://dl.brave.com/install.sh | sh
  335.  
  336. # Install Chromium Browser
  337. sudo dnf install -y chromium
  338.  
  339.  
Tags: fedora
Add Comment
Please, Sign In to add comment