Basic Commands for HyprL Users

Table of Contents

This guide introduces fundamental commands for interacting with your Arch Linux system and managing your Hyprland environment.

Arch Linux Package Management (pacman)

pacman is the default package manager for Arch Linux.

  • Update your system:

    sudo pacman -Syu

    This command synchronizes package databases and updates all installed packages.

  • Install a package:

    sudo pacman -S <package_name>

    Replace <package_name> with the name of the software you want to install (e.g., sudo pacman -S firefox).

  • Remove a package:

    sudo pacman -R <package_name>

    This removes the specified package. Use -Rs to also remove dependencies that are no longer needed by any other installed package.

  • Search for a package:

    pacman -Ss <keyword>

    Searches the official repositories for packages matching the keyword.

  • Query installed packages:

    pacman -Q

    Lists all installed packages. Use pacman -Qi <package_name> for detailed information about a specific installed package.

System Service Management (systemctl)

systemctl is used to control the systemd system and service manager.

  • Start a service:

    sudo systemctl start <service_name>

    (e.g., sudo systemctl start NetworkManager)

  • Enable a service (start on boot):

    sudo systemctl enable <service_name>

    (e.g., sudo systemctl enable NetworkManager)

  • Check service status:

    systemctl status <service_name>

    This shows whether a service is active, inactive, enabled, or disabled, and recent logs.

  • Stop a service:

    sudo systemctl stop <service_name>
  • Restart a service:

    sudo systemctl restart <service_name>

Viewing System Logs (journalctl)

journalctl is used to query and display messages from the systemd journal.

  • View all system logs:

    journalctl
  • View logs for a specific service:

    journalctl -u <service_name>

    (e.g., journalctl -u NetworkManager)

  • View user-specific logs:

    journalctl --user

    This is useful for debugging user-level services like Waybar or Hyprland itself.

  • Follow logs in real-time:

    journalctl -f

Basic Hyprland Commands

While many Hyprland actions are tied to keybindings, here are some direct commands:

  • Reload Hyprland configuration:

    hyprctl reload

    This command reloads your hyprland.conf and other related configuration files without restarting the entire session.

  • Dispatch commands (advanced):

    hyprctl dispatch <command>

    (e.g., hyprctl dispatch exit to exit Hyprland, or hyprctl dispatch exec kitty to launch Kitty terminal). This is primarily used within keybindings but can be run directly.

  • Query Hyprland state:

    hyprctl clients
    hyprctl monitors
    hyprctl workspaces

    These commands provide information about active windows, connected monitors, and current workspaces.

File System Navigation and Management

These are standard Linux commands, but crucial for managing your system.

  • List directory contents:

    ls
    ls -l # long format
    ls -a # show hidden files
  • Change directory:

    cd <directory_path>
    cd ~ # go to home directory
    cd .. # go up one directory
  • Print working directory:

    pwd
  • Create a directory:

    mkdir <directory_name>
  • Remove files/directories:

    rm <file_name>
    rm -r <directory_name> # remove directory and its contents recursively

    Use rm with caution!

  • Copy files/directories:

    cp <source> <destination>
    cp -r <source_directory> <destination_directory>
  • Move/Rename files/directories:

    mv <source> <destination>

Text Editors

You’ll often need to edit configuration files. Common command-line editors include:

  • Nano: A simple, user-friendly editor.

    nano <file_name>
  • Vim/Neovim: A powerful, highly configurable editor with a steep learning curve.

    nvim <file_name>

    (HyprL uses Neovim by default, configured in dotfiles/.config/nvim/init.vim).

This page provides a starting point. As you become more familiar with your system, you’ll discover many more commands and tools.