Mastering Ubuntu Terminal Shortcuts: Boost Your Productivity with Essential, Intermediate, and Advanced Key Commands

目次

1. Introduction

When using Ubuntu, working with the terminal is essential. Especially for developers and server administrators, optimizing terminal operations is extremely important.
By leveraging “Ubuntu Terminal Shortcuts”, you can eliminate unnecessary keystrokes and dramatically boost your workflow speed.

This article provides a practical explanation of shortcuts ranging from beginner-friendly basics to advanced techniques for experienced users.
We also cover customization methods and real-world use cases so you can use the terminal more comfortably.

What You Will Gain from This Article

  • Basic Ubuntu Terminal shortcuts
  • Useful time-saving techniques for intermediate and advanced users
  • How to customize shortcuts
  • Practical usage scenarios

    Benefits of Learning Shortcuts

    • Improved typing efficiency: Quickly move the cursor and search through history
    • Optimized command operations: Instantly execute frequently used commands
    • Reduced workload: Minimize mouse usage and operate using only the keyboard

    Let’s start learning Ubuntu Terminal shortcuts.

    2. Basic Ubuntu Terminal Shortcuts (Beginner Level)

    If you are new to the terminal, start by learning the basic shortcuts below.
    These are used frequently in daily tasks and are convenient to memorize early.

    Cursor Movement Shortcuts

    These shortcuts allow you to move the cursor quickly when editing text in the terminal.

    ShortcutDescription
    Ctrl + AMove cursor to the beginning of the line
    Ctrl + EMove cursor to the end of the line
    Ctrl + BMove cursor left (same as ← key)
    Ctrl + FMove cursor right (same as → key)

    Text Editing Shortcuts

    Shortcuts that let you delete and edit text quickly.

    ShortcutDescription
    Ctrl + HDelete one character (same as Backspace)
    Ctrl + DDelete the character under the cursor (same as Delete key)
    Ctrl + WDelete the word to the left of the cursor
    Ctrl + UDelete from cursor to the beginning of the line
    Ctrl + KDelete from cursor to the end of the line
    Ctrl + YPaste the most recently deleted text

    Command History Operations

    You can speed up work by referencing previously executed commands.

    ShortcutDescription
    Ctrl + PDisplay previous command (same as ↑ key)
    Ctrl + NDisplay next command history (same as ↓ key)
    Ctrl + RSearch for a specific command in history (reverse search)
    Ctrl + GExit history search

    Terminal Display Shortcuts

    Shortcuts for operating the terminal screen smoothly.

    ShortcutDescription
    Ctrl + LClear the screen (same as clear)
    Ctrl + SPause input
    Ctrl + QResume paused input

    3. Accelerate Ubuntu Terminal Operations! Intermediate Shortcuts

    Once you’re familiar with the basics, try more advanced shortcuts.
    Learning process control and display shortcuts makes terminal operations smoother.

    Process Management Shortcuts

    Controlling processes is essential in Ubuntu. These shortcuts simplify task management.

    ShortcutDescription
    Ctrl + CForce-stop the running process
    Ctrl + ZPause the current process
    fgResume a paused process in the foreground
    bgResume a paused process in the background

    Copy & Paste

    Copying and pasting inside the terminal works differently from standard shortcuts.

    ShortcutDescription
    Ctrl + Shift + CCopy text
    Ctrl + Shift + VPaste text

    Using these shortcuts will make your workflow smoother.

    4. Advanced Ubuntu Terminal Shortcuts (Productivity Boost Edition)

    After mastering basic and intermediate shortcuts, use advanced shortcuts to supercharge your terminal workflow.
    Learn commands for word-based navigation, case conversion, and terminal session management to work even more efficiently.

    Advanced Text Editing Shortcuts

    Advanced shortcuts that let you edit faster than with normal cursor movement.

    ShortcutDescription
    Esc + BMove cursor one word to the left
    Esc + FMove cursor one word to the right
    Esc + UConvert text from cursor to the end of the word to uppercase
    Esc + LConvert text from cursor to the end of the word to lowercase
    Esc + CCapitalize the first letter of the current word
    Ctrl + TSwap the two characters around the cursor

    Terminal Session Management (Multiple Windows)

    Use shortcuts to seamlessly switch between multiple terminal tabs or windows.

    ShortcutDescription
    Ctrl + Shift + TOpen a new tab
    Ctrl + Shift + WClose the current tab
    Ctrl + PageUpMove to the previous tab
    Ctrl + PageDownMove to the next tab
    Ctrl + Shift + NOpen a new terminal window

    Background Process Management

    Advanced users often run multiple processes simultaneously.
    These shortcuts help manage them efficiently.

    ShortcutDescription
    Ctrl + ZPause the running process
    bgResume the paused process in the background
    fgResume the paused process in the foreground
    jobsList background processes
    kill [PID]Force-stop a process using a specific PID

    5. How to Customize Ubuntu Terminal Shortcuts

    Ubuntu provides many useful shortcuts, but customizing them for your workflow enables an even more efficient environment.
    This section explains how to use aliases, and customize .bashrc and .inputrc.

    Shorten Commands with Aliases

    By setting up aliases, you can shorten frequently used commands and reduce keystrokes.

    Alias Basics

    An alias lets you call a command using a shorter name.
    For example, shorten ls -la to ll:

    alias ll='ls -la'

    This applies only to the current session.

    Make Aliases Persistent

    To keep aliases after closing the terminal, add them to ~/.bashrc or ~/.zshrc.

    1. Edit .bashrc (or .zshrc):
       nano ~/.bashrc   # For Bash users
       nano ~/.zshrc    # For Zsh users
    1. Add aliases at the end of the file:
       alias ll='ls -la'
       alias cls='clear'
       alias grep='grep --color=auto'
       alias gs='git status'
    1. Apply changes:
       source ~/.bashrc   # or source ~/.zshrc

    💡 Tips

    • Enable colored output for grep using grep --color=auto.
    • Shorten Git operations with aliases like gs.

    Customize with .bashrc

    ~/.bashrc is a configuration file executed when Bash starts.
    Editing it lets you freely customize terminal behavior.

    Example 1: Show a message when the terminal opens

    echo "Welcome to Ubuntu Terminal! Let’s do our best today!"

    Example 2: Automatically move to a directory

    cd ~/projects

    💡 Tips

    • Automatically move to common development directories like ~/projects.
    • Add clear at the end of .bashrc to start with a clean screen.

    Modify Keybindings with .inputrc

    Edit ~/.inputrc to customize Bash keybindings.

    Example 1: Execute ls -la with Ctrl + T

    "\C-t": "ls -la
    "

    Apply settings:

    bind -f ~/.inputrc

    Example 2: Change history search behavior

    "\e[A": history-search-backward
    "\e[B": history-search-forward

    💡 Tips

    • Using history-search-backward enables instant command recall with partial input.
    • Customize keys like Ctrl + T for personalized shortcuts.

    6. Use Cases: Real Terminal Time-Saving Workflows

    Once you learn shortcuts and customization methods, the key is how to apply them to real workflows.
    Here are practical examples for developers, server administrators, and everyday users.

    For Developers: Speed Up Git Tasks

    For developers, efficient Git operations are essential.

    Useful Git Workflow Shortcuts

    ShortcutDescription
    Ctrl + RSearch previous Git commands
    !!Re-execute previous command
    alias gs='git status'Run git status as gs
    alias ga='git add .'Run git add . as ga
    alias gc='git commit -m'Commit using gc "message"

    Search Git History Efficiently

    Quickly recall past Git commands using history search:

    Ctrl + R → type "git"

    💡 Tips

    • Search history with Ctrl + R to avoid retyping long commands.
    • Use aliases to shorten common Git commands.

    For Server Administrators: Optimize SSH & Log Management

    Efficient terminal usage is crucial when managing remote servers.

    SSH Shortcut Setup

    Add shortcuts in ~/.ssh/config to simplify login:

    Host myserver
        HostName 192.168.1.100
        User ubuntu
        IdentityFile ~/.ssh/id_rsa

    Then connect using:

    ssh myserver

    💡 Tips

    • Shorten server names to reduce typing.
    • Use Ctrl + Shift + T to open new tabs for multiple servers.

    Simplify Log Monitoring

    alias logs='tail -f /var/log/syslog'

    Now run:

    logs

    💡 Tips

    • Aliases eliminate repetitive typing for log commands.

    For General Users: Make Terminal Work Comfortable

    Even everyday users can benefit from shortcuts.

    Efficient File Operations

    Shortcut / CommandDescription
    llShortened ls -la (via alias)
    mkdir -pCreate nested directories in one action
    rm -iAsk confirmation before deleting
    mv -iPrevent overwriting files accidentally

    Quick Access to Frequent Directories

    alias docs='cd ~/Documents'
    alias dl='cd ~/Downloads'

    Now just type:

    docs
    dl

    💡 Tips

    • Aliases let you navigate directories with a single command.
    • Use Ctrl + L to clear the screen for better visibility.

    7. FAQ (Frequently Asked Questions)

    Here are common questions and solutions regarding Ubuntu Terminal shortcuts and usage.
    You may encounter issues such as “shortcuts not working” or unexpected behavior.
    This section explains frequent problems, causes, and solutions.

    Q1. Why aren’t Ubuntu Terminal shortcuts working?

    Possible Causes

    1. You are using a different shell
    • The default shell in Ubuntu is bash, but zsh or fish may behave differently.
    1. Keybindings have been modified
    • You may have disabled shortcuts via ~/.inputrc.
    1. Input is frozen due to Ctrl + S
    • Pressing Ctrl + S stops terminal input.
    • Solution → Press Ctrl + Q to resume.

    Solutions

    • Check your current shell:
      echo $SHELL

    If not bash, switch to Bash:

      chsh -s /bin/bash
    • Reset shortcut settings in .inputrc:
      set editing-mode emacs
      set keymap emacs
    • Reload settings:
      source ~/.inputrc

    Q2. Copy & Paste shortcuts don’t work

    Cause

    • Ctrl + C and Ctrl + V have different meanings inside the terminal.

    Solution

    Use the following shortcuts instead:

    ActionShortcut
    CopyCtrl + Shift + C
    PasteCtrl + Shift + V

    💡 Tip

    • Adding Shift enables standard copy and paste in Ubuntu Terminal.

    Q3. How do I customize shortcuts?

    Method 1: Edit .bashrc

    Add shortcut configurations to .bashrc.

    bind '"\C-t": "ls -la
    "'

    Reload settings:

    source ~/.bashrc

    Method 2: Use Aliases

    alias ll='ls -la'
    alias gs='git status'
    alias ..='cd ..'

    Persist settings:

    source ~/.bashrc

    Q4. Do shortcuts work in WSL?

    Most shortcuts work in WSL, but some depend on Windows Terminal settings or WSL version.

    Key Differences in WSL

    ShortcutUbuntuWSL
    Ctrl + CForce-stop processSame
    Ctrl + LClear screenSame
    Ctrl + Shift + CCopyDepends on Windows Terminal settings
    Ctrl + Shift + VPasteDepends on Windows Terminal settings

    💡 Solutions

    • Change shortcuts in Windows Terminal settings.
    • Edit .bashrc for WSL customization.

    Q5. How do I disable shortcuts?

    Use bind to disable unwanted shortcuts.

    Disable Ctrl + S

    stty -ixon

    This disables input freeze from Ctrl + S.

    💡 Tip

    • Add to .bashrc to make persistent:
      echo "stty -ixon" >> ~/.bashrc
      source ~/.bashrc

    Q6. How do I change fonts and colors?

    Method 1: GNOME Terminal Settings

    1. Press Ctrl + Shift + P to open preferences.
    2. Select “Profiles” → “Fonts & Colors”.
    3. Select your preferred theme.

    Method 2: Apply Custom Theme

    git clone https://github.com/aaron-williamson/base16-gnome-terminal.git ~/.config/base16-gnome-terminal
    cd ~/.config/base16-gnome-terminal
    ./base16-default.dark.sh

    8. Summary

    This article explained how to use Ubuntu Terminal shortcuts step by step.

    Key Takeaways

    Basic shortcuts: Cursor movement, text editing, command history
    Intermediate shortcuts: Process management, copy & paste
    Advanced shortcuts: Text editing, terminal session control, background process management
    Customization: Aliases, .bashrc, .inputrc
    Real-world use: Git workflows, SSH and logs, directory shortcuts

    By mastering these shortcuts, your terminal workflow becomes smoother and significantly faster.
    Use them daily to enhance your productivity.