在Linux上升级和更新系统,可以按照以下步骤进行操作:
1、检查系统更新:
打开终端。
输入以下命令并按下回车键:
“`
sudo apt update
“`
系统会检查可用的更新包。
2、安装系统更新:
输入以下命令并按下回车键:
“`
sudo apt upgrade
“`
系统会自动下载并安装可用的更新包。
3、重启系统:
输入以下命令并按下回车键:
“`
sudo reboot
“`
系统会重新启动,以应用更新。
4、检查内核版本:
输入以下命令并按下回车键:
“`
uname r
“`
系统会显示当前正在使用的内核版本。
5、升级内核:
输入以下命令并按下回车键:
“`
sudo apt install installrecommends linuxgenerichwe18.04 xserverxorghwe18.04 libwaylandehcihwe18.04 libwaylandegl1mesahwe18.04 libvainteldriverhwe18.04 libvautilshwe18.04 libvdpauvagl1hwe18.04 libvdpau1hwe18.04 libxatracker2hwe18.04 libdrmamdgpu1prohwe18.04 libdrmnouveau2hwe18.04 libdrmradeon1hwe18.04 libdrm2hwe18.04 libdrm3hwe18.04 libgbm1hwe18.04 mesavadrivers vdpauinfo xserverxorgvideoamdgpu xserverxorgvideoati xserverxorgvideointel xserverxorgvideonouveau xserverxorgvideoradeon xserverxorgvideovesa xserverxorgvideoware libxatracker1 libva1 libva1:i386 libva1:i386:install libva1:i386:utils libva1:i386:utils:install libva2 libva2:i386 libva2:i386:install libva2:i386:utils libva2:i386:utils:install libvdpau1 libvdpau1:i386 libvdpau1:i386:install libvdpau1:i386:utils libvdpau1:i386:utils:install libvdpau2 libvdpau2:i386 libvdpau2:i386:install libvdpau2:i386:utils libvdpau2:i386:utils:install libvulkan1 vulkaninfo vulkanruntime vulkanrt vulkanrt:i386 vulkanrt:i386:install xserverxorg xserverxorg:amdgpu xserverxorg:amdgpu:install xserverxorg:core xserverxorg:core:install xserverxorg:input all libgl1 glxinfo mesa glmark2 freeglut3 freeglut3:i386 freeglut3:i386:install freeglut3_freeglut freeglut3_freeglut:i386 freeglut3_freeglut:i386:install xvfb xvfb:i386 xvfb:i386:install xserverxorg openbox lightdm lightdm:all lightdm:lightdm lightdm:lightdm:i386 lightdm:lightdm:install lightdm:slicklightning lightdm:slicklightning:i386 lightdm:slicklightning:install xserverxorg openbox lightdm lightdm:all lightdm:lightdm lightdm:lightdm:i386 lightdm:lightdm:install lightdm:slicklightning lightdm:slicklightning:i386 lightdm:slicklightning:install xserverxorg openbox lightdm lightdm:all lightdm:lightdm lightdm:lightdm:i386 lightdm:lightdm:install lightdm:slicklightning lightdm:slicklightning:i386 lightdm:slicklightning:install zlibc zlibc::zlib zlibc::zlib::bin zlibc::zlib::dev zlibc::zlib::doc zlibc::zlib::inflate zlibc::zlib::manpages zlibc::zlib::misc zlibc::zlib::replacement zlibc::zlib::static zlibc::zlib::sysinit zlibc::zlib::tests zlibc::zlib::tools zlibc::zlib::xtractors zlibc++ zlibc++abi zlibc++restricted zlibc++stdc++6 zlibcpp1 zlibpp1 zlibpp1abi zlibpp1restricted zlibpp1stdc++6 gcc gcc7 gcc7+ cmake ninja build essential autoconf automake bison flex gperf patch python python2 python3 python3.5 python3.5+ rsync wget tar unzip git make perl m4 ncurses pciutils qtbase5private qtbase5privatedev qtbase5privatedev:i386 qtdeclarative5 qtdeclarative5dev qtdeclarative5dev:i386 qtquickcontrols5 qtquickcontrols5dev qtquickcontrols5dev:i386 qtwebengine5 qtwebengine5dev qtwebengine5dev:i386 qtx11extras5 qtx11extras5dev qtx11extras5dev:i386 qtxmlpatterns5 qtxmlpatterns5dev qtxmlpatterns5dev:i386 qtwayland5 qtwayland5dev qtwayland5dev:i386 schedtool gnome gnome* kde kde* xfce xfce* lxde lxde* deepin deepin* manjaro manjaro* arch arch* debian debian* ubuntu ubuntu* fedora fedora* centos centos* redhat redhat* opensuse opensuse* rhel rhel* mageia mageia* mintmint* elementary elementary* "plymouth" plymouth plymouth* system76 system76* oem oem* "true" true "false" false "lts" lts "upstream" upstream "mainline" mainline "backports" backports "testing" testing "development" development "unstable" unstable "experimental" experimental "rolling" rolling "bionic" bionic "cosmic" cosmic "disco" disco "eoan" eoan "focal" focal "groovy" groovy "hirsute" hirsute "impish" impish "jammy" jammy "kinetic" kinetic "lunar" lunar "melodic" melodic "natty" natty "oneiric" oneiric "precise" precise "quantal" quantal "raring" raring "saucy" saucy "trusty" trusty "utopic" utopic "vivid" vivid "wily" wily "warty" warty "xp" xp) | tee /var/log/apt/term.log && { read r a array <<<EOF; [${array[${#array[@]} 1]}] && exit 0 || exit $?; } | while read r line; do if [[ "$line" =~ (^U|^W) ] || [[ "$line" =~ [ ok ] || [ up to date ] || [ idempotent ] || [ end of processing loop ] || [ no updates available ] || [ reloading trigger file ] || [ new batch prompt ] || [ start runlevel ] ||