OS Copilot is an intelligent assistant for operating systems, built by Alibaba Cloud on a Large Language Model (LLM). It supports natural language Q&A, assisted command execution, and system O&M and optimization to help you use Linux systems more efficiently. This guide covers the benefits, features, and usage of OS Copilot.
Release history
Supported operating systems
|
Operating system |
Version |
Supported architectures |
|
Alibaba Cloud Linux |
Alibaba Cloud Linux 3 |
x86_64, aarch64 |
|
Alibaba Cloud Linux 2 |
x86_64 |
|
|
KeyarchOS |
KOS V5.8 SP2 |
x86_64, aarch64 Note
KeyarchOS requires a specific version of OS Copilot to be installed.
|
|
Ubuntu |
Ubuntu 24.04 |
x86_64, aarch64 |
|
Ubuntu 22.04 |
x86_64, aarch64 |
|
|
Ubuntu 20.04 |
x86_64 |
|
|
Anolis OS |
Anolis OS 8 |
x86_64, aarch64 |
|
Anolis OS 7 |
x86_64 |
|
|
CentOS |
CentOS 8 |
x86_64, aarch64 |
|
CentOS 7 |
x86_64 |
Benefits
-
Intelligent
OS Copilot continuously learns from your usage patterns to improve accuracy and provide predictive suggestions.
-
Expert
OS Copilot provides expert answers to operating system questions.
-
Efficient
OS Copilot helps you with system diagnosis, optimization, and programming.
-
Collaborative
Manage your Alibaba Cloud resources with OS Copilot for an integrated service experience.
Features
-
Natural language Q&A on the command line
OS Copilot allows you to ask questions in natural language directly from the command line, providing expert answers related to daily use and OS-specific topics. This improves your operational efficiency and overall experience.
-
Assisted command execution
OS Copilot's assisted command execution feature helps new Linux users quickly master basic skills.
-
Alibaba Cloud CLI integration
OS Copilot integrates with the Alibaba Cloud CLI, allowing you to manage Alibaba Cloud products and query ECS information with simple commands directly from the operating system.
-
System O&M and optimization
System O&M and optimization are critical scenarios where the performance of the operating system significantly impacts your business. OS Copilot lets you use natural language to invoke relevant O&M and optimization tools, especially Alibaba Cloud's proprietary system tools, making it easier to diagnose system issues and improve performance.
Prerequisites
-
If you are a RAM user, ensure the root Alibaba Cloud account has granted your user the
AliyunSysOMOSCopilotAccesssystem policy. For more information, see Grant permissions to a RAM User. -
OS Copilot runs only on Elastic Compute Service (ECS) instances.
Install OS Copilot
-
Install the latest version of OS Copilot.
Alibaba Cloud Linux
Check if OS Copilot is installed.
rpm -q os-copilot-
If it is not installed, run the following command to install it.
sudo yum install -y os-copilot -
If it is already installed, run the following command to upgrade it to the latest version.
sudo yum update os-copilot
Ubuntu, Anolis OS, or CentOS
-
For x86_64 architecture:
curl -#S https://mirrors.aliyun.com/os-copilot/os-copilot-all-in-one-latest.sh | sudo bash -
For aarch64 architecture:
curl -#S https://mirrors.aliyun.com/os-copilot/os-copilot-all-in-one-arm-latest.sh | sudo bash
-
-
Configure your credentials.
You can configure credentials in either of the following ways. We recommend using ECS instance role-based authentication to minimize the risk of exposing your
AccessKey pair.ECS instance role
Limitations
For the latest information, see Instance RAM Roles.
Procedure
-
Log in to the RAM console to create a RAM role and grant permissions to it.
-
Create a RAM role for an Alibaba Cloud service.
In the left-side navigation pane, choose , and then click Create Role. Follow the on-screen instructions to create the role. Pay attention to the following parameters. For more information about other parameters, see Create a common service role.
-
For Select Trusted Entity, select Alibaba Cloud Service.
-
For Role Type, select Normal Service Role. For Trusted Service, select Elastic Compute Service.

-
-
Grant the
AliyunSysOMOSCopilotAccesspermission to the newly created RAM role.
-
-
Assign the RAM role to your ECS instance.
Go to ECS console - Instances.
-
In the top navigation bar, select the resource group and region where your target instance is located.
-
Click the ID of the target instance to go to its details page. In the upper-right corner of the page, choose More > Grant/Revoke RAM Role.
-
In the dialog box that appears, select the instance RAM role you created, and click OK.

AK/SKauthenticationRun the following commands to configure environment variables.
export ALIBABA_CLOUD_ACCESS_KEY_ID=<AccessKey ID> export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<AccessKey Secret>NoteReplace
<AccessKey ID>and<AccessKey Secret>with your actual AccessKey ID and AccessKey Secret.-
For more information, see View the AccessKey pair of a RAM User.
-
The AccessKey Secret is displayed only when you create an AccessKey pair and cannot be retrieved later.
-
Upgrade or uninstall OS Copilot
Alibaba Cloud Linux
-
Upgrade OS Copilot to the latest version.
sudo yum update os-copilot -
Uninstall OS Copilot.
sudo yum remove -y os-copilot
Ubuntu, Anolis OS, or CentOS
Uninstall OS Copilot.
sudo rm -f /bin/co /bin/copilot /etc/profile.d/os-copilot_fix_command_tool_config.sh
To upgrade, first uninstall the current version, and then install the new one.
Use OS Copilot
Custom configuration
You can customize model invocation and MCP Server connections by using the following configuration.
Custom model invocation supports only text generation models. It fully supports the Qwen series and third-party models such as deepseek-r1, deepseek-v3.2, and kimi-k2.
For specific model names, see the Alibaba Cloud Bailian model list.
# Instructions:
# 1. Copy this file to the default path: ~/.copilot_tool/config.toml
# OR
# 2. Copy this file to any location and set the environment variable OS_COPILOT_CONFIG_PATH to point to its path.
# For general conversation and tasks
[default]
model_name = "qwen3-max"
[default.generate_kwargs]
temperature = 0.2
max_tokens = 2000
top_p = 0.5
# For code-related tasks
[code]
model_name = "qwen3-coder-plus"
[code.generate_kwargs]
temperature = 0.1
max_tokens = 4000
top_p = 0.5
# MCP (Model Context Protocol) Configuration
[[mcp]]
name = "mcp_tool_1" # MCP server name
transport = "streamable_http" # Transport protocol: 'streamable_http' or 'sse'
url = "" # MCP service endpoint
# timeout = 30 # Optional: Connection timeout (seconds)
# sse_read_timeout = 300 # Optional: SSE read timeout (seconds)
# headers = { } # Optional: Custom request headers
# Example: Add a second MCP service
[[mcp]]
name = "mcp_tool_2"
transport = "streamable_http"
url = ""
Single-command mode
In single-command mode, append your question directly to the copilot or co command. The command exits after providing an answer.

Parameters supported in single-command mode:
# co --help
usage: copilot [-h] [-v] [--mode MODE] [--task] [-f FILE] [prompt ...]
OS Copilot: An OS assistant using LLM technique
positional arguments:
prompt The prompt containing your query. If empty, interactive mode is entered.
options:
-h, --help show this help message and exit
-v, -V, --version show version info and exit
--mode MODE, -m MODE, -M MODE
specify the MODE to use (optional). available MODE: chat, task, aliyun, codesum, codegen
--task, -t, -T task mode(can use mcp tools),automatically identify and execute tasks
-f FILE, --file FILE get prompt from the FILE
-
Key parameters
Parameter
Description
Example
-t
Enters
taskmode, which allows OS Copilot to automatically orchestrate workflows and call sub-agents to complete the task.co check current system health -t-f
Reads content from a file or defines complex tasks for processing.
co -f task -t. For a video demonstration, see Use files to define complex tasks.|
Uses a pipe.
cat /etc/sysctl.conf | co explain what these parameters mean -
Key tools and features
OS Copilot integrates plugin tools for software management, command checking and execution, file reading and writing, and the Alibaba Cloud CLI. The following examples demonstrate these capabilities.
-
Knowledge Q&A

-
Simple command or script generation and execution

-
Software management
-
-
Multi-step task execution
-
-
File read and write operations
NoteEnsure that the log file to be analyzed does not exceed 100 lines to avoid exceeding the maximum token limit.

-
Alibaba Cloud CLI
-
Install the Alibaba Cloud CLI software.
NoteThis document uses the installation of Alibaba Cloud CLI on an Alibaba Cloud Linux 3 system as an example. For instructions on how to install the CLI on other systems, see Install the CLI on Linux.
sudo dnf install aliyun-cli -y -
Configure Alibaba Cloud CLI permissions by using an AK/SK.
aliyun configureConfigure the settings as prompted.

-
The following example shows how to use OS Copilot to call the Alibaba Cloud CLI.

-
-
Question mark command
If a command fails, enter ? or why to ask OS Copilot for an explanation and a potential solution.
Run source /etc/os-copilot/fix_command_config.sh to enable this feature.

-
If you encounter a "command not found" error for
?orwhy, runsource /etc/os-copilot/fix_command_config.shto enable the command. -
This feature collects command execution error logs. To disable it, start a new session (for example, by logging out and back in).
Interactive mode
-
Run the
copilotorcocommand to enter interactive mode, which supports multi-turn conversations and defaults to Chat mode. -
Run the
exitorquitcommand, or pressCtrl+DorCtrl+Cto exit interactive mode.
The following modes are available:
-
CHAT: The default chat mode. You can switch to this mode by running thechatcommand. If OS Copilot outputs a shell command in this mode, you can select the corresponding number to automatically execute it. -
TASK: The task orchestration mode. OS Copilot understands your intent, breaks down tasks, and assigns them to sub-agents for execution. Switch to this mode with thetaskcommand. -
CODEGEN: Automatically generates code based on your instructions. You can switch to this mode by running thecodegencommand. -
CODESUM: Reads a local code snippet file and automatically generates a code summary. You can switch to this mode by running thecodesumcommand. -
ALIYUN: Calls the Alibaba Cloud CLI to perform O&M operations. You can switch to this mode by running thealiyuncommand.
Hands-on lab
Explore features like Q&A, assisted O&M, and code learning in our hands-on lab. This lab helps you efficiently solve system problems and improve your programming productivity. Access the lab here: [Lab] Unlock OS O&M and Programming with OS Copilot.
Console diagnostic agent
The diagnostic agent in the Operating System Console's smart assistant automatically runs diagnostic tools when you ask for help with an issue.
Procedure
-
Open the smart assistant chat box on the Operating System Console page.

-
Start a conversation with the smart assistant about a diagnostic issue, for example, a memory anomaly.
Enter a query, such as "memory anomaly". The assistant guides you to provide the necessary information for diagnosis, such as the ECS Instance ID and Region.
Output: Prompts the user to enter additional diagnostic information.
Input: ECS ID and Region


After you provide the required information, the system indicates that a diagnosis is in progress.

When the diagnosis is complete, the assistant provides a summary of the results.



Click the link to view the detailed diagnosis report.

-
You can continue the conversation or ask about other diagnostic functions.
Input: Other questions
Output: A normal response is returned.
If the conversation freezes or becomes unresponsive, type "Start a new conversation" to restart.
Product video
Technical support
If you have any questions or suggestions while using OS Copilot, you can use the following channels to provide feedback and obtain technical support.
-
DingTalk Group (Recommended): Join the technical support DingTalk group (ID: 71050008820) to contact technical support.
-
Submit a ticket: You can also submit a ticket for more free support.
-
Documentation feedback: If you find any issues with the product documentation, such as broken links, incorrect content, or API errors, you can click Feedback in the floating menu on the right side of the page or select the problematic content and click Feedback.
-
To help us improve OS Copilot, please fill out our survey.

















