Skip to content

Arch Linux

Muchang Bahng edited this page Jun 17, 2025 · 2 revisions

For Arch installation, use the September 1 ISO version and follow the comprehensive installation guide available at https://www.youtube.com/watch?v=8oCHxzJky4U.

The installation process requires careful attention to partitioning, bootloader configuration, and initial system setup.


Package Management

Arch Linux uses pacman as its package manager. Here are the essential commands:

Basic Operations

Install packages:

sudo pacman -S pkg1 pkg2

Remove packages:

sudo pacman -R pkg          # Basic removal
sudo pacman -Rs pkg         # Remove with dependencies
sudo pacman -Rns pkg        # Remove with dependencies and config files
sudo pacman -Rc pkg         # Remove with dependent packages

Update system:

sudo pacman -Syu            # Full system update
sudo pacman -Syy            # Force refresh package databases

Query Operations

List packages:

pacman -Q                   # All installed packages
pacman -Qi pkg              # Detailed package info
pacman -Ql pkg              # Files provided by package
pacman -Qdt                 # Orphaned packages
pacman -Qu                  # Available updates
pacman -Qet                 # Explicitly installed packages

Advanced Management

Dependency trees:

pactree pkg                 # View dependency tree (requires pacman-contrib)

Cache management:

paccache -r                 # Keep 3 most recent versions
pacman -Sc                  # Remove uninstalled packages from cache
pacman -Scc                 # Remove all cached packages

Package information:

expac -H M '%m\t%n' | sort -h                           # Package sizes
expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 20  # Last 20 installed

Configuration:

  • Main config: /etc/pacman.conf
  • Package cache: /var/cache/pacman/pkg/

Vim and Neovim Setup

Vim is available on every Linux system, while Neovim may require installation. Learning Vim significantly improves coding efficiency and system administration capabilities.

Configuration

Vim configuration:

  • Config file: ~/.vimrc
  • Plugins directory: ~/.vim/

Neovim configuration:

  • Config directory: ~/.config/nvim/
  • Main file: ~/.config/nvim/init.lua
  • Plugins location: ~/.local/share/nvim/site/pack/packer/
    • start/ - Auto-loaded plugins
    • opt/ - Lazy-loaded plugins

Neovim structure:

  • init.lua - Main configuration entry point
  • lua/user/options.lua - Basic options
  • lua/user/keymaps.lua - Key mappings
  • Plugin-specific configuration files

Troubleshooting

Health check:

:checkhealth

Plugin issues:

  1. Delete problematic plugin directory in pack/packer
  2. Run :PackerInstall to re-download
  3. Ensure all dependencies are installed and in $PATH

LaTeX Setup

LaTeX provides excellent document preparation, especially for academic and technical writing. This guide covers local desktop setup as an alternative to Overleaf.

Prerequisites

Install a PDF viewer like zathura (lightweight with vim navigation):

sudo pacman -S zathura

VimTex Configuration

Install VimTex plugin:

use 'lervag/vimtex'

Install TeX Live: Download from https://tug.org/texlive/quickinstall.html

sudo perl ./install-tl --scheme=small

Installation options:

  • --scheme=small - Installs ~350 packages (vs. 5000 in default)
  • --location - Set server location if needed
  • Avoid --no-interaction to customize --texuserdir

Add binaries to PATH for tlmgr access and VimTex integration.

Install latexmk compiler:

sudo tlmgr install latexmk

Verify installation:

:checkhealth

LaTeX Package Management

Location: /usr/local/texlive/202*/

Essential tlmgr commands:

# List all available packages
tlmgr list

# List installed packages  
tlmgr list --only-installed

# Install packages with dependencies
sudo tlmgr install amsmath tikz

# Reinstall package
sudo tlmgr install amsmath --reinstall

# Remove package
sudo tlmgr remove amsmath

Reference: Complete tlmgr documentation available at http://tug.ctan.org/info/tlmgrbasics/doc/tlmgr.pdf


Clone this wiki locally