Sign up Log in
n/ubuntu · 4d ago · Edited · 175 views
u/BearPawMaster
n/ubuntuu/BearPaw · 4d ago

12. Terminal Customization and Productivity Tools

The default terminal is already usable, but a lot of the little time-saving details are still turned off: smarter completion, friendlier prompts, and smoother history search. In this chapter, we’ll use a setup that’s as stable as possible to get your terminal to a state where it won’t get annoying over the long run.

1. Install Zsh

Zsh is an enhanced version of Bash, with more powerful autocompletion and plugin support.

1. Install Zsh:

sudo apt install zsh

2. Verify the installation:

zsh --version

3. Set it as the default shell:

chsh -s $(which zsh)

Note: after entering your password, you may need to log out and back in for it to take effect.

2. Install Oh My Zsh

Oh My Zsh is a framework for managing Zsh configuration, and it makes setting up Zsh ridiculously easy.

It’s a good idea to back up your config file before installing (if you already have ~/.zshrc):

cp ~/.zshrc ~/.zshrc.bak 2>/dev/null || true

Install command (requires curl and git first):

sudo apt install curl git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Once installed, you’ll notice the prompt has changed and the colors look nicer.

3. Change Themes

Oh My Zsh ships with hundreds of themes.

1. Edit the config file:

nano ~/.zshrc

2. Change the theme:
Find the line ZSH_THEME="robbyrussell".
• Recommended theme 1: ys (clean and clear, shows username, path, and Git branch).
• Recommended theme 2: agnoster (super flashy, requires Powerline fonts).
Change it to: ZSH_THEME="ys"
3. Apply the config:

source ~/.zshrc

4. Essential Plugins

Plugins are the soul of Zsh.

More plugins isn’t better. You really only need a few: input suggestions, syntax highlighting, and quick jumping. Something that runs reliably for a year matters more than looking flashy.

A. zsh-autosuggestions (autosuggestions)

When you type a command, it automatically suggests what comes next based on history (shown in gray); just press the right arrow key to complete it.

  1. Download:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

B. zsh-syntax-highlighting (syntax highlighting)

Correct commands are green, wrong ones are red—you can tell at a glance.

  1. Download:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

C. Enable the plugins

  1. Open ~/.zshrc.
  2. Find the line plugins=(git) .
  3. Change it to:
plugins=(
    git
    zsh-autosuggestions
    zsh-syntax-highlighting
    extract  # 这是一个解压神器,x filename 即可解压任何格式
    z        # 快速跳转目录,z 目录名 即可跳转
)
  1. Run source ~/.zshrc to apply it.

5. Tmux: The Terminal Multiplexer

If you often need to run multiple tasks in one window or work remotely over SSH, Tmux is a must-install.

• Features: lets you split a terminal window into multiple panes, or run sessions in the background so a dropped connection doesn’t interrupt your tasks.
• Install: sudo apt install tmux

Once you’ve got all this set up, your terminal won’t just look professional—your productivity will jump by an order of magnitude.

Ubuntu for Beginners Tutorial · Contents

01. Why Choose Linux/Ubuntu?

02. Ubuntu Preparation and Installation Options

03. Step-by-Step Ubuntu 24.04 LTS Installation

04. First Look at the GNOME Desktop Environment

05. Software Installation and Management: Saying Goodbye to .exe

06. Chinese Environment Setup and Input Methods

07. Office and Productivity Tools

08. First Steps with the Linux Terminal

09. Linux File Permissions and User Management

10. The Text Editor Debate: Getting Started with Nano and Vim

11. Software Management on the Ubuntu Command Line (APT)

Translated by AI from 简体中文

3
1
Log into join the discussion.
QuicksilverVPN

快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。

umami.dnsl.top Learn more

1 replies

Sort order
  1. niuma Silver 4d ago

    Take a look

    Translated by AI from 简体中文

    1