Ubuntu Server / 업그레이드 하는 방법
다음은 Ubuntu Server 18.04에서 20.04로 업그레이드하는 방법입니다.
Ubuntu 버전 확인
현재 사용 중인 Ubuntu의 버전은 여러 가지 방법으로 확인할 수 있습니다.
cat /etc/issue Ubuntu 18.04.4 LTS \n \l
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic
do-release-upgrade -V do-release-upgrade: version 18.04.36
Ubuntu 18.04에서 Ubuntu 20.04로 업그레이드
업그레이드는 do-release-upgrade 명령어로 합니다.
do-release-upgrade -h Usage: do-release-upgrade [options] Options: -h, --help show this help message and exit -V, --version Show version and exit -d, --devel-release If using the latest supported release, upgrade to the development release --data-dir=DATA_DIR Directory that contains the data files -p, --proposed Try upgrading to the latest release using the upgrader from $distro-proposed -m MODE, --mode=MODE Run in a special upgrade mode. Currently 'desktop' for regular upgrades of a desktop system and 'server' for server systems are supported. -f FRONTEND, --frontend=FRONTEND Run the specified frontend -c, --check-dist-upgrade-only Check only if a new distribution release is available and report the result via the exit code --allow-third-party Try the upgrade with third party mirrors and repositories enabled instead of commenting them out. -q, --quiet
다음과 같이 명령하면 최신 버전으로 업그레이드 합니다. 중간중간 물음이 있는데, 대부분 y로 진행하면 됩니다.
do-release-upgrade -d
주의할 점은...
- 만일의 사태에 대비해서 중요한 자료와 설정은 백업해두세요.
- SSH로 원격 접속하여 업그레이드하는 것은 권장하지 않습니다. 연결이 끊길 수 있으므로 컴퓨터에서 직접합니다.(하지만, SSH로도 잘 되기는 합니다.)
- 업그레이드를 마치면 재부팅해야 합니다.
- 클라우드 서비스에 있는 가상 머신의 경우 버전 업그레이드를 권장하지 않거나 금지하기도 합니다. 서비스 제공자에게 미리 문의하는 게 좋습니다.
- 업그레이드 후 버전을 확인해보세요.
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal