๐ง Manjaro Linux Initialization Script for Efficient System Setup#

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
๐ฅ 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.
- Configure Manjaro Mirrors
- Install Essential Packages
- Configure Passwordless Sudo
- Enable Tab Completion
- Retrieve Public SSH Key from GitHub
- Install VIM-PLUG
- Configure tmux
- Install Fcitx5 Input Method
- Install Google Chrome
- Install Docker
๐งฉ Breakdown the Script#
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.
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.
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
.
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.
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.



9. Install Google Chrome#
1
| pamac build google-chrome
|
- Builds and installs Google Chrome from the AUR using
pamac
.


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.