Skip to content

Command Snippets

Command snippets allow you to quickly execute predefined commands in the terminal, improving work efficiency.

Overview

When typing in the terminal, you can click the execute button of a command in the snippet bar, and the snippet content will automatically be inserted into the terminal input box for execution.

Using Command Snippets

Basic Usage

  1. Open Terminal: After connecting to a host, the terminal window will open automatically
  2. View Snippets: The snippet bar will be displayed above the terminal input box
  3. Execute Command: Click the execute button of a snippet, and the command content will automatically be inserted into the terminal input box
  4. Confirm Execution: Press Enter to execute the command

Snippet Bar

The snippet bar displays currently available command snippets, including:

  • Command name
  • Execute button
  • Command preview (optional)

Main Features

  • Command Group Management: Create and manage command groups for easy categorization
  • Command Creation: Create new command snippets, supporting multi-command combinations
  • Macro Recording: Record terminal operations to automatically generate command snippets
  • Command Editing: Edit and delete created command snippets

Use Cases

Common Operations Commands

Quickly execute common system check commands:

  • System status check
  • Log viewing
  • Service restart
  • File backup

Repetitive Tasks

For tasks that need to be executed repeatedly, using command snippets can:

  • Reduce input errors
  • Improve execution efficiency
  • Standardize operation procedures

Complex Command Combinations

Combine multiple related commands into one snippet:

  • Environment check scripts
  • Deployment process commands
  • Troubleshooting steps

Best Practices

Command Naming

  • Use clear, descriptive names
  • Avoid overly short abbreviations
  • Name by function or scenario

Command Organization

  • Use command groups for categorized management
  • Place related commands in the same group
  • Regularly organize and clean up unused commands

Security Recommendations

Security Notice

  • Carefully check command content before execution
  • For commands involving system modifications, it is recommended to verify in a test environment first
  • Avoid including sensitive information (such as passwords) in command snippets
  • Regularly review command snippets and delete those no longer needed

License