Creating a Bootable USB Drive
- Download the ISO from a local mirror, such as Alibaba Cloud, or the official site, wich automatically selects the fastest route.
- When using tools like UltraISO, select RAW mode for writing the image to avoid many common issues.
- Alternatively, write the USB on Linux:
sudo dnf install -y epel-release ntfsprogs ntfs-3g
sudo mkfs.ntfs /dev/sdb1 -I # Replace with your detected USB device
sudo dd if=/home/user1/system/Rocky-9.3-x86_64-dvd.iso of=/dev/sdb1
Installation Points
- Do not apply any security policy during setup.
- If the installation source is not automatically found, provide the repository URL manually.
Essential First Steps
Switch to a Faster Repository Mirror
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \
-i.bak \
/etc/yum.repos.d/Rocky-*.repo
sudo yum makecache
Enable Network at Boot
Edit the interface configuration file inside /etc/sysconfig/network-scripts/ and change ONBOOT=no to ONBOOT=yes:
sudo vi /etc/sysconfig/network-scripts/ifcfg-enp5s0
Install EPEL and Additional Repositories
sudo dnf install epel-release
Enable PowerTools (CRB on Rocky 9):
# Rocky 8
sudo dnf --enablerepo=powertools install ntfs-3g
# Rocky 9+
sudo dnf config-manager --set-enabled crb
Mount NTFS Partitions
Idetnify the disk and UUID:
sudo lsblk -f
Append to /etc/fstab:
UUID=ABCDDASFSAFS /home/user1/E ntfs-3g defaults 0 0
Permission Fixes for Mounted Drives
- Edit
/etc/sudoersand add after the root entry:
root ALL=(ALL) ALL
user1 ALL=(ALL) ALL
- Assign user to the root group:
sudo usermod -g root user1
Package and Environment Setup
Package Managers
sudo dnf install snapd
sudo systemctl enable snapd
sudo systemctl start snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install snap-store
# Rust package manager
sudo dnf install cargo
SSH and GNOME Tweaks
sudo dnf install openssh
systemctl enable sshd
sudo systemctl start sshd
sudo dnf install gnome-tweak-tool
sudo dnf install gnome-shell-extension*
Development Compilers and Libraries
sudo dnf install gcc gcc-c++ gcc-gfortran cmake mpich-devel fftw-devel lapack*
Scientific Vector Graphics
sudo dnf install inkscape
sudo dnf install ImageMagick # For .miff files from OpenDX
PDF Reader (Okular)
# Requires PowerTools / CRB
# Rocky 9
sudo dnf config-manager --set-enabled crb
sudo dnf install okular
Terminal Emulator
sudo dnf install konsole
Chinese Input Method
sudo dnf install ibus-libpinyin
Add environment variables to ~/.bashrc:
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
Code and Text Editors
sudo dnf install gedit-plugins
sudo dnf install kate
Multimedia and Utilities
VLC Media Player
# Enable RPM Fusion repositories for Rocky 9
sudo dnf install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
sudo dnf install https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-9.noarch.rpm
sudo dnf clean all
sudo dnf makecache
sudo dnf install vlc
FFmpeg
sudo dnf install ffmpeg ffmpeg-devel -y
Image Viewer
cargo install viu
Digitizer Tool
sudo dnf install engauge-digitizer
Research and Productivity Tools
Mathpix (Formula Recognition)
Download the AppImage, register, and use Ctrl+Alt+M to capture formulas.
Crystallography with py4DSTEM
conda create -n py4dstem python==3.8
conda activate py4dstem
conda install pip
pip install "py4dstem[aiml]"
File Synchronization with rsync
sudo dnf install rsync
# Example pull with delete and resume
rsync -e ssh -avP -z user@10.8.145.193:/home/remoteDir /home/localDir --ignore-existing --delete
Clipboard Utilities
sudo dnf install xsel xclip -y
# Output clipboard to file
echo $(xsel --clipboard) >> a.txt
# Copy file content to clipboard
cat a.txt | xsel --clipboard
Markdown, LaTeX, and Document Processing
Markdown Preview and Conversion
Install Atom or ghostwriter. To view markdown inside Atom: Packages → Markdown Preview → Toggle Preview (Ctrl+Shift+M).
For PDF generation:
sudo dnf install pandoc
pandoc README.md -o README.pdf --pdf-engine=xelatex
LaTeX Integration with gedit
External tools script:
#!/bin/sh
auxname=$(basename "$GEDIT_CURRENT_DOCUMENT_NAME" .tex)
bibtex "$auxname.aux"
System Conveniences
Trash-Enabled rm Alias
Add to ~/.bashrc:
alias rm=trash
alias rl='ls ~/.trash'
trash() {
mv -f --backup=numbered $@ ~/M/.trash/
}
cleartrash() {
read -p "Clear sure?[n]" confirm
[ $confirm == 'y' ] || [ $confirm == 'Y' ] && /bin/rm -rf ~/.trash/*
}
Quick Directory Aliases
alias sw='cd /home/user1/M/E/SW'
alias pg='cd /home/user1/M/E/PG'
alias code='cd /home/user1/M/E/Data/PostProc'
SSH Key-Based Login
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 server@10.7.190.18
# Ensure server .ssh permissions are 755 and authorized_keys 600
cd && chmod -R 700 .ssh && cd .ssh && chmod -R 600 *
Troubleshooting and Missing Libraries
- Wi-Fi not available:
#!/bin/sh
sudo modprobe -r ideapad_laptop
- WPS missing libs:
sudo dnf install libXScrnSaver
sudo dnf install mesa-libGLU
- Multiwfn libm.so error:
sudo dnf install motif motif-devel
- PDF grep:
sudo dnf --enablerepo=powertools install pdfgrep # Rock 8
sudo dnf --enablerepo=crb install pdfgrep # Rock 9+
- Additional Fonts:
sudo cp -r myfonts /usr/share/fonts
sudo chmod -R 777 /usr/share/fonts/myfonts
sudo mkfontscale
sudo mkfontdir
sudo fc-cache -fv