Advertisement
fkeles

ubuntu-upgrade.sh

Sep 22nd, 2023 (edited)
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.07 KB | Source Code | 0 0
  1. ubuntu@FAKELES-7310:~$ cat /etc/os-release
  2. NAME="Ubuntu"
  3. VERSION="20.04.6 LTS (Focal Fossa)"
  4. ID=ubuntu
  5. ID_LIKE=debian
  6. PRETTY_NAME="Ubuntu 20.04.6 LTS"
  7. VERSION_ID="20.04"
  8. HOME_URL="https://www.ubuntu.com/"
  9. SUPPORT_URL="https://help.ubuntu.com/"
  10. BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
  11. PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
  12. VERSION_CODENAME=focal
  13. UBUNTU_CODENAME=focal
  14.  
  15. ## update
  16. ubuntu@FAKELES-7310:~$ sudo apt update && sudo apt full-upgrade
  17. # restart Ubuntu on PowerShell
  18. PS C:\Users\FAKELES> wsl.exe -l -v
  19.   NAME                    STATE           VERSION
  20. * Ubuntu                  Running         2
  21.   rancher-desktop-data    Stopped         2
  22.   rancher-desktop         Stopped         2
  23. PS C:\Users\FAKELES> wsl.exe --shutdown
  24. PS C:\Users\FAKELES> wsl.exe -d Ubuntu
  25.  
  26. ## complete update
  27. ubuntu@FAKELES-7310:~$ sudo do-release-upgrade
  28.  
  29. Do you want to start the upgrade?
  30.  
  31. 31 installed packages are no longer supported by Canonical. You can
  32. still get support from the community.
  33.  
  34. 14 packages are going to be removed. 339 new packages are going to be
  35. installed. 1788 packages are going to be upgraded.
  36.  
  37. You have to download a total of 1477 M. This download will take about
  38. 3 minutes with your connection.
  39.  
  40. Installing the upgrade can take several hours. Once the download has
  41. finished, the process cannot be canceled.
  42.  
  43.  Continue [yN]  Details [d]y
  44. ## if you lock yourself out
  45. ## run this on Powershell to login
  46. ## with root (no password) and fix it
  47. PS C:\Users\FAKELES> ubuntu config --default-user root
  48. PS C:\Users\FAKELES> ubuntu config --default-user ubuntu
  49.  
  50. ubuntu@FAKELES-7310:~$ cat /etc/os-release
  51. PRETTY_NAME="Ubuntu 22.04.3 LTS"
  52. NAME="Ubuntu"
  53. VERSION_ID="22.04"
  54. VERSION="22.04.3 LTS (Jammy Jellyfish)"
  55. VERSION_CODENAME=jammy
  56. ID=ubuntu
  57. ID_LIKE=debian
  58. HOME_URL="https://www.ubuntu.com/"
  59. SUPPORT_URL="https://help.ubuntu.com/"
  60. BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
  61. PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
  62. UBUNTU_CODENAME=jammy
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement