Download Links (Quick Access)
macOS
Ubuntu_x64
Ubuntu_x86
NeoKylin_x64
NeoKylin_x86
macOS users can install via Homebrew:
brew install --cask HuaDeity/tap/easyconnect
Original Source
This article was converted by SimpRead; original source: blog.huadeity.com
Introduction
Recently, I’ve been working on my undergraduate thesis project and started using the server provided by my university’s lab. To be honest, the lab’s hardware configuration is truly impressive: a 48-core CPU, 256 GB of RAM, and six NVIDIA GeForce RTX 2080 Ti GPUs — a setup that brings immense joy to someone like me who usually works on a lightweight laptop.
However, the user experience isn’t quite as smooth. The biggest issue is that users are not granted administrator (root) privileges — understandably so, since this is a shared server used by many people. Unlike my personal servers where I routinely log in directly as root, here such privileges are strictly restricted.
Lacking administrator access imposes several limitations:
- You cannot install software packages you need — e.g., Zsh, Neovim, Pyenv, or Curl.
- You cannot use
systemctlto run programs as background services (e.g., Clash). - You cannot change your default shell.
- …and many more.
So how can we configure a usable environment under these constraints?
VPN
Since I’m currently working from home, and the lab server’s IP address belongs to a private LAN, a VPN is required to establish connectivity. We need to download EasyConnect. This marks the second Intel-based application I’ve installed (after Zotero), but unfortunately, EasyConnect will not receive updates in the foreseeable future — meaning we must make do with the current version. Interestingly, EasyConnect coexists peacefully with local proxy tools; its underlying mechanism for establishing the VPN connection remains unclear.
Download EasyConnect
macOS
Ubuntu_x64 Ubuntu_x86 NeoKylin_x64 NeoKylin_x86
macOS users can install via Homebrew:
brew install --cask HuaDeity/tap/easyconnect
The EasyConnect Homebrew Cask is maintained by me. Because installation involves importing Sangfor’s certificates and because the package lacks timely updates and official code signing, it cannot be accepted into the official Homebrew Cask repository. Hence, installation must be performed from my personal tap. Additionally, several other Casks I maintain are included in the official Homebrew Cask repository — see my GitHub repository for details. These include the popular menu-bar browser MenubarX and the CNKI “Global Academic Express” CAJViewer (Apple Silicon version).
Command-Line Configuration
Shell
My local shell environment looks like this:
It features syntax highlighting, colorized and icon-enhanced ls output, an aesthetically pleasing and functional prompt, intelligent suggestions, and tab completion.
P.S.
This setup uses the terminal emulator iTerm2, themed with Catppuccin, fonts MonoLisa + Nerd Font, and shell prompt powered by Zsh + Oh My Zsh + Powerlevel10k. For full configuration details, refer to my dotfiles repository.
In contrast, the lab server’s initial shell environment is completely barebones:
As previously mentioned, installing alternative shells like Zsh or Fish is impossible due to lack of admin privileges. Even if one could manually install them, changing the default shell is prohibited — and launching Zsh/Fish from .bashrc introduces compatibility issues. Consequently, features like syntax highlighting, command completion, and intelligent suggestions remain unavailable.
Having limited familiarity with Bash, I lacked experience configuring it to match the usability of Zsh or Fish. Research confirmed Bash’s relatively poor extensibility — achieving syntax highlighting or similar advanced features is essentially impractical.
Tips:
- A Bash framework analogous to Oh My Zsh is Bash-it.
- An editor-like enhancement for Bash called ble.sh provides near-equivalent functionality (e.g., syntax highlighting), but it failed unexpectedly in my environment for unknown reasons — thus only mentioned here for reference.
Achieving a satisfying command-line experience purely through shell configuration on the remote server proves highly challenging. Instead, let’s pivot: if remote-side configuration is severely constrained, why not leverage our powerful local terminal to emulate those capabilities?
Terminal
iTerm2
Yes — again, the most feature-rich terminal emulator. Previously, I introduced its integrated GPT natural language processing capability; here, I’ll highlight its Shell Integration feature.
Shell Integration significantly enhances both shell functionality and synchronization between shell and terminal — even for remote shells accessed via SSH. Key features include:
- Marks: Bookmarks for positions within your shell history — enabling quick navigation to previous prompts or other locations of interest.
- Command Completion Alerts: iTerm2 displays a modal alert upon completion of long-running commands (if enabled).
- Command Metadata: View detailed information about past commands — including exit status codes, working directories, execution duration, etc.
- One-click Remote File Download: Right-click filenames (e.g., in
lsoutput) to download them instantly. - Drag-and-Drop Upload via SCP: Hold Option and drag files from Finder into iTerm2 to upload them.
- Command History Browser: Search and browse command history either via the toolbar or a pop-up window.
- Smart Directory Navigation: iTerm2 remembers visited directories, sorts them by frequency, and allows fast access via toolbar or pop-up.
- Profile Auto-Switching: Assign custom profiles to specific hostnames, usernames, or combinations thereof — automatically switching profiles upon login/logout per your rules.
- Prompt Alignment Guarantee: Ensures the command prompt always begins at column 0, even when the previous command didn’t end with a newline.
Installing Shell Integration
Shell Integration must be installed both locally (on your Mac) and remotely (on the server). Beta and nightly builds of iTerm2 support automatic SSH integration for compatible remote hosts. However, the lab server’s shell environment doesn’t meet those requirements, necessitating manual installation.
Once installed, you can fully utilize iTerm2’s enhanced prompting, history, and other features.
Warp
As a next-generation terminal built for the 21st century, Warp delivers out-of-the-box SSH support and includes all the shell-level enhancements typically found in Zsh or Fish — such as syntax highlighting, intelligent suggestions, tab completion, command history, and rich prompts — implemented directly at the terminal layer.
Moreover, Warp’s text-editor-like interface ensures blazing-fast responsiveness. Under typical terminals, network latency or server load causes noticeable input lag during SSH sessions; Warp, however, feels instantaneous — as if typing locally — eliminating perceptible delays. Its editor-style UX also lowers the learning curve for newcomers unfamiliar with CLI workflows.
Tip: Among GPU-accelerated terminals:
- Hyper is Electron-based.
- Alacritty, Kitty, and WezTerm use OpenGL (with recent WezTerm versions adding Metal support).
- Apple has deprecated OpenGL in favor of Metal. Both iTerm2 and Warp implement GPU acceleration exclusively via Metal.
Network Configuration
After setting up a functional command-line environment, the next hurdle emerged: network connectivity.
Indeed, behind China’s Great Firewall (GFW), even the lab server couldn’t reach GitHub — or perhaps my senior lab mates simply hadn’t explained how to configure it. So I configured it myself.
Unlike personal devices requiring complex routing rules, the server only needs basic GitHub accessibility. Thus, any client supporting my chosen protocol suffices.
Because my preferred protocol lacks HTTP proxy support, I opted instead for Clash, specifically its enhanced fork Clash Meta.
Tip: See also my related blog post: How to Learn From Google and Github in China Mainland
Since systemctl is unavailable for keeping processes running in the background, I used tmux — a terminal multiplexer — to achieve similar persistent background operation. After launching Clash Meta, add the following lines to your ~/.bashrc (replacing port with the actual port number configured in Clash):
export https_proxy=http://127.0.0.1:port
export http_proxy=http://127.0.0.1:port
export all_proxy=socks5://127.0.0.1:port
Most CLI tools respect these environment variables for proxy configuration. For exceptions (e.g., Git), consult their respective documentation for custom proxy setup.
Package Management
Without administrator privileges, system-level package managers (e.g., apt, yum) are unusable.
After trying third-party alternatives like Linuxbrew and Pyenv, I found they were incompatible:
- Linuxbrew requires root privileges for initial setup.
- Pyenv needs build dependencies (e.g., compilers, libraries) — which aren’t installed on the lab server.
Thus, I settled on Conda.
Conda isn’t limited to data-science packages — the conda-forge channel offers mainstream utilities like Zsh, Curl, and Starship.
You don’t need the full Anaconda distribution. Installing just Miniconda or Miniforge is sufficient.
Summary
This article outlines practical approaches to configuring a productive command-line environment on servers lacking administrator privileges. As a heavy CLI user (Neovim enthusiast), optimizing the terminal experience is essential for efficient remote work.
For users less comfortable with CLI configuration, consider leveraging built-in remote development features in Visual Studio Code or JetBrains IDEs.