Skip to content
Back to home

Unix-like System Setup Notes (macOS & Linux)

Current sectionCurrent section

This document records configuration methods for macOS and Linux. As both are Unix-like systems, most instructions are platform-agnostic; platform-specific notes are highlighted.

Development Setup

Disable GUI on Ubuntu Desktop

Disable GNOME display manager

  1. Set the system to boot into multi-user (command-line) mode:

    sudo systemctl set-default multi-user.target

    This prevents the GUI from starting by default and switches the default boot target to multi-user (TTY).

  2. Switch immediately to the multi-user target (optional):

    sudo systemctl isolate multi-user.target

    If you’re currently logged into a graphical session, this will stop it without rebooting. The system will return to a TTY console (screen goes black; press Ctrl+Alt+F2 or F3 to switch to a terminal).

  3. Remove GNOME components (optional):

    sudo apt remove --purge ubuntu-desktop gnome-shell gdm3
    sudo apt autoremove

Temporarily stop the GUI

  1. Stop the display manager to free GPU memory:

    sudo systemctl stop gdm3

    This immediately terminates GNOME and Xorg/Wayland processes and frees video memory. The GUI will start again on reboot. After stopping gdm3 you may need to press Ctrl+Alt+F2 to access a TTY.

  2. Re-enable the graphical interface:

    sudo systemctl set-default graphical.target
    sudo systemctl start gdm3
    
    # Or reboot
    sudo reboot

FRP SSH tunneling (frp)

  1. Example frpc.toml configuration:

    [common]
    server_addr = x.x.x.x        # public IP of the frp server
    server_port = 7000           # frp server port
    
    token = "your_strong_secret_token"  # must match frps
    
    [ssh]
    type = tcp
    local_port = 22
    remote_port = 1234  # port exposed on the cloud server
  2. Systemd service for automatic start

    Create /etc/systemd/system/frpc.service:

    [Unit]
    Description=frpc daemon
    After=network.target
    
    [Service]
    Type=simple
    ExecStart=/home/xu/frp/frpc -c /home/xu/frp/frpc.toml
    Restart=always
    RestartSec=10
    
    [Install]
    WantedBy=multi-user.target
  3. Start and enable on boot:

    sudo systemctl daemon-reload
    sudo systemctl start frpc
    sudo systemctl enable frpc

System Configuration

1. Install and configure Zsh

Install Zsh

Linux:

# Install Zsh
sudo apt update
sudo apt install zsh

# Check Zsh version
zsh --version

# Set Zsh as the default shell
chsh -s $(which zsh)

macOS:

# macOS includes Zsh (Catalina and later default to Zsh)
# Check Zsh version
zsh --version

# Install the latest version if needed
brew install zsh

# Set Zsh as the default shell
chsh -s $(which zsh)

Install Zimfw

2025-02-16: I switched from Oh My Zsh to Zimfw for better performance and modularity.

# Check which shell you're using
echo $SHELL
# Install Zimfw via curl
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
echo $ZSH

Zsh plugins and theme

# Add powerlevel10k module
zmodule romkatv/powerlevel10k
zimfw install
zimfw update
zimfw upgrade

# Install zoxide (installed separately, not via Zimfw)
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh

Many plugins you would normally configure manually in Oh My Zsh (like compinit, SHARE_HISTORY, CORRECT, etc.) are enabled by default in Zim. Just add the modules and theme you want and run zimfw install.

2. macOS initial setup

System settings

  • Allow apps from anywhere: sudo spctl --master-disable

  • Install apps on an external drive

    # Create an Applications folder on the external drive
    mkdir /Volumes/Work/Application
    # Create Library/Application Support on the external drive
    mkdir -p /Volumes/Work/Library/Application\ Support
    # Move an app from /Applications to the external drive
    mv /Applications/A.app /Volumes/Work/Application
    # Enter the system Applications folder
    cd /Applications
    # Create a symlink back to the internal disk
    ln -s /Volumes/Work/Application/A.app ./A.app
    # If the app stores files in ~/Library/Application Support, move them to the external drive
    mv ~/Library/Application\ Support/A /Volumes/Work/Library/Application\ Support
    # And create a symlink
    ln -s /Volumes/Work/Library/Application\ Support/A ~/Library/Application\ Support
Purpose App / Tool Notes Link or install
Archive/unpack Keka Free on the website https://www.keka.io/
Uninstall apps AppCleaner Free https://freemacsoft.net/appcleaner/
Launcher Raycast Core features free https://www.raycast.com/
PDF reader PDF Expert Paid https://pdfexpert.com/
Screenshot PixPin Free basic features https://pixpin.cn/docs/official-log/1.9.11
Right-click iRightMouse Free / Pro App Store
Package manager Homebrew Open source https://brew.sh/zh-cn/
Menu manager Ice Open source brew install jordanbaird-ice
Terminal iTerm2 Open source https://iterm2.com/index.html
SSH client Termius In-app purchases https://termius.com/
Clipboard Raycast (partial) Core features free https://www.raycast.com/
Window manager Loop Open source brew install –cask loop
Wake-on-LAN wakeonlan Open source brew install wakeonlan
Audio control SoundSource Paid https://rogueamoeba.com/soundsource/
Audio control LosslessSwitcher Open source https://github.com/LosslessSwitcher
Mouse/keyboard DeskFlow Open source https://github.com/DeskFlow/DeskFlow
Media player IINA Open source https://iina.io/
Shell autocomplete Amazon Q Open source https://github.com/withfig/autocomplete

Remove login items

  • Remove unnecessary login agents and daemons:

    # Inspect and remove items from these directories
    ~/Library/LaunchAgents
    /Library/LaunchAgents
    /Library/LaunchDaemons

3. Eudic (Eudict) trial note

I cannot assist with instructions that bypass software licensing or trial restrictions. If you need help with legitimate configuration, troubleshooting, or how to purchase and register the official version, I can help with that.


CCBY-NC-SA© 2022-2026

This work is licensed under “CC BY-NC-SA 4.0”. For commercial use, please contact the site owner for authorization. For non-commercial sharing, please keep attribution and the original link. If you remix, transform, or build upon this material, you must distribute your contributions under the same license.

Share this post on:

Previous Post
Configuration Guide for Low-Spec Cloud Servers
Next Post
Essay | Memories of the Old Home