Ubuntu에 최신 Kernel 5.0을 설치하는 방법
주기적으로 새로운 장치와 기술이 출시되고 있으며이를 최대한 활용하려면 Linux 시스템 커널을 최신 상태로 유지하는 것이 중요합니다.
또한 시스템 커널을 업데이트하면 새로운 커널 기능을 쉽게 이용할 수 있으며 이전 버전에서 발견 된 취약성으로부터 자신을 보호하는 데 도움이됩니다.
Ubuntu 및 Debian 또는 Linux Mint와 같은 파생 제품 중 하나에서 커널을 업데이트 할 준비가 되셨습니까? "그렇다면 계속 읽으십시오!
설치된 커널 버전 확인
시스템에 설치된 커널의 현재 버전을 찾으려면 다음을 수행 할 수 있습니다.
$ uname -sr
다음은 Ubuntu 18.04 서버에서 위 명령의 출력을 보여줍니다.
Linux 4.15.0-42-generic
Ubuntu Server에서 커널 업그레이드
Ubuntu에서 커널을 업그레이드하려면 http://kernel.ubuntu.com/~kernel-ppa/mainline/으로 이동하여 목록에서 원하는 버전 (Kernel 5.0이 작성 당시 최신 버전 임)을 클릭하여 선택하십시오. ".
다음으로 wget 명령을 사용하여 시스템 아키텍처에 대한 .deb
파일을 다운로드합니다.
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb $ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb $ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb $ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb
$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb $ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb $ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-unsigned-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb $ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb
위의 커널 파일을 모두 다운로드했으면 이제 다음과 같이 설치합니다.
$ sudo dpkg -i *.deb
(Reading database ... 140176 files and directories currently installed.) Preparing to unpack linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb ... Unpacking linux-headers-5.0.0-050000 (5.0.0-050000.201903032031) over (5.0.0-050000.201903032031) ... Preparing to unpack linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb ... Unpacking linux-headers-5.0.0-050000-generic (5.0.0-050000.201903032031) over (5.0.0-050000.201903032031) ... Preparing to unpack linux-image-unsigned-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb ... Unpacking linux-image-unsigned-5.0.0-050000-generic (5.0.0-050000.201903032031) over (5.0.0-050000.201903032031) ... Selecting previously unselected package linux-modules-5.0.0-050000-generic. Preparing to unpack linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb ... Unpacking linux-modules-5.0.0-050000-generic (5.0.0-050000.201903032031) ... Setting up linux-headers-5.0.0-050000 (5.0.0-050000.201903032031) ... Setting up linux-headers-5.0.0-050000-generic (5.0.0-050000.201903032031) ... Setting up linux-modules-5.0.0-050000-generic (5.0.0-050000.201903032031) ... Setting up linux-image-unsigned-5.0.0-050000-generic (5.0.0-050000.201903032031) ... Processing triggers for linux-image-unsigned-5.0.0-050000-generic (5.0.0-050000.201903032031) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.0.0-050000-generic /etc/kernel/postinst.d/x-grub-legacy-ec2: Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /boot/vmlinuz-4.15.0-42-generic Found kernel: /boot/vmlinuz-4.15.0-29-generic Found kernel: /boot/vmlinuz-5.0.0-050000-generic Found kernel: /boot/vmlinuz-4.15.0-42-generic Found kernel: /boot/vmlinuz-4.15.0-29-generic Replacing config file /run/grub/menu.lst with new version Updating /boot/grub/menu.lst ... done /etc/kernel/postinst.d/zz-update-grub: Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.0.0-050000-generic Found initrd image: /boot/initrd.img-5.0.0-050000-generic Found linux image: /boot/vmlinuz-4.15.0-42-generic Found initrd image: /boot/initrd.img-4.15.0-42-generic Found linux image: /boot/vmlinuz-4.15.0-29-generic Found initrd image: /boot/initrd.img-4.15.0-29-generic done
설치가 완료되면 컴퓨터를 재부팅
하고 새 커널 버전이 사용 중인지 확인합니다.
$ uname -sr

그리고 그게 다야. "이제 Ubuntu와 함께 기본적으로 설치된 것보다 훨씬 최신 커널 버전을 사용하고 있습니다.
이 기사에서는 Ubuntu 시스템에서 Linux 커널을 쉽게 업그레이드하는 방법을 보여주었습니다. 소스에서 커널을 컴파일해야하기 때문에 여기에 표시하지 않은 또 다른 절차가 있습니다. 이는 프로덕션 Linux 시스템에서는 권장되지 않습니다.
학습 경험으로 커널을 컴파일하는 데 여전히 관심이있는 경우 Kernel Newbies 페이지에서 수행 방법에 대한 지침을 얻을 수 있습니다.
항상 그렇듯이이 기사에 대한 질문이나 의견이 있으면 아래 양식을 사용하십시오.