๐Ÿง Manjaro Linux Initialization Script for Efficient System Setup

Manjaro-Linux-Initialization-Script

Setting up a fresh Manjaro Linux environment can be streamlined with a comprehensive Bash script that automates essential configurations and installations.


Before running the initialization script, switch the default shell to Bash for compatibility

1
chsh -s /bin/bash

๐Ÿ“ฅ Run the Script

Execute all steps with a single command:

1
bash -c "$(wget -qLO - https://kingtam.eu.org/scripts/manjaro_int.sh)"

๐Ÿ”ง Script Overview

The script provides a menu-driven interface with ten options, each automating a specific setup task. It loops until exit is selected, allowing multiple configurations in one session.

๐Ÿ“‹ Menu Options

  1. Configure Manjaro Mirrors
  2. Install Essential Packages
  3. Configure Passwordless Sudo
  4. Enable Tab Completion
  5. Retrieve Public SSH Key from GitHub
  6. Install VIM-PLUG
  7. Configure tmux
  8. Install Fcitx5 Input Method
  9. Install Google Chrome
  10. Install Docker

๐Ÿงฉ Breakdown the Script

1. Configure Manjaro Mirrors

  • 1
    
    sudo pacman-mirrors --fasttrack 20 && sudo pacman -Syyu --noconfirm
    

    Optimizes mirror selection for faster downloads.

  • Updates the package database and system.


2. Install Essential Packages

1
sudo pacman -Syu --noconfirm git wget curl tree iperf3 vim tmux
  • Installs commonly used tools for development and system diagnostics.

3. Configure Passwordless Sudo

1
2
3
current_user=$(whoami)
echo "$current_user ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/"$current_user"
sudo chmod 440 /etc/sudoers.d/"$current_user"
  • Grants the current user permission to run sudo commands without entering a password.

4. Enable Tab Completion

1
echo "set completion-ignore-case on" >> ~/.inputrc
  • Improves shell usability by allowing case-insensitive tab completion.

5. Retrieve Public SSH Key from GitHub

1
bash <(curl -fsSL git.io/key.sh) -g sillydanny
  • Downloads and installs a public SSH key for GitHub access.

6. Install VIM-PLUG and Configure Vim

1
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  • Installs vim-plug, a plugin manager for Vim.
  • Adds a set of useful plugins and configurations to .vimrc.

7. Configure tmux

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cat << 'EOF' > ~/.tmux.conf
set -g mouse on
set-option -g status-position top
set -g status-bg colour235
set -g status-fg white
set -g status-left-length 50
set -g status-right-length 50
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
set -g base-index 1
setw -g pane-base-index 1
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r H resize-pane -L 5
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r L resize-pane -R 5
set-option -g renumber-windows on
set -g history-limit 10000
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
EOF
  • Sets up tmux with custom keybindings, mouse support, and visual enhancements.

8. Install Fcitx5 Input Method

1
sudo pacman -S --noconfirm fcitx5-im fcitx5-configtool fcitx5-chinese-addons manjaro-asian-input-support-fcitx5 fcitx5-table-extra
  • Installs Fcitx5 and related packages for multilingual input, including Chinese.

2025-10-04_172348

2025-10-04_172420

2025-10-04_172512


9. Install Google Chrome

1
pamac build google-chrome
  • Builds and installs Google Chrome from the AUR using pamac.

2025-10-04_172614

2025-10-04_173555


10. Install Docker

1
2
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
  • Installs Docker using the official convenience script for containerized development.

๐Ÿ“ฆ Conclusion

Manjaro setup just got a turbo boost. No more typing the same commands like a robot every time a fresh install happens.