← 返回命令列表

Linux command

do-release-upgrade 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Upgrade to the latest release

sudo do-release-upgrade

Upgrade to the development release

sudo do-release-upgrade -d

Upgrade using the proposed upgrader

sudo do-release-upgrade -p

Check if an upgrade is available without performing it

sudo do-release-upgrade -c

Run upgrade in server mode with text frontend

sudo do-release-upgrade -m server -f DistUpgradeViewText

Test upgrade in a sandbox without modifying the system

sudo do-release-upgrade -s

说明

do-release-upgrade upgrades Ubuntu to a new release version. It handles the complex process of updating sources, upgrading packages, and resolving conflicts. It is the recommended command for upgrading servers and systems without a graphical environment, or when upgrading over a remote connection. By default, upgrades are only offered to the next LTS release (for LTS users) or the next release (for non-LTS users). The -d flag is needed to upgrade to a development release.

参数

-h, --help
Show help message and exit.
-d, --devel-release
If using the latest supported release, upgrade to the development release.
-p, --proposed
Try upgrading using the upgrader from ubuntu-proposed.
-c, --check-dist-upgrade-only
Check if a new release is available and exit without upgrading.
-m _MODE_, --mode _MODE_
Run in a special upgrade mode. Supported modes are "desktop" and "server".
-f _FRONTEND_, --frontend _FRONTEND_
Run the specified frontend (DistUpgradeViewGtk3, DistUpgradeViewText, DistUpgradeViewNonInteractive).
-s, --sandbox
Test upgrade with a sandbox aufs overlay.

FAQ

What is the do-release-upgrade command used for?

do-release-upgrade upgrades Ubuntu to a new release version. It handles the complex process of updating sources, upgrading packages, and resolving conflicts. It is the recommended command for upgrading servers and systems without a graphical environment, or when upgrading over a remote connection. By default, upgrades are only offered to the next LTS release (for LTS users) or the next release (for non-LTS users). The -d flag is needed to upgrade to a development release.

How do I run a basic do-release-upgrade example?

Run `sudo do-release-upgrade` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -h, --help do in do-release-upgrade?

Show help message and exit.