# debian 9升级到debian 10

## step1:**更新**

```
apt-get update && apt-get upgrade
```

## **step2:备份一份**

```
cp /etc/apt/sources.list /etc/apt/sources.list.orig
```

## **step3:将/etc/apt/sources.list里所有“stretch”替换为“buster”**

```
sed -i 's/stretch/buster/g' /etc/apt/sources.list
```

## **step4:再更新一下**

```
apt-get update && apt-get upgrade
```

## **step5:执行升级命令**

```
apt-get dist-upgrade
```

## **step6:提示完成后重启**

```
reboot
```

## **step7:查看下当前debian版本**

```
lsb_release -a
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgking.gitbook.io/linux/debian-9-sheng-ji-dao-debian-10.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
