Ubuntu tips and tricks: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Fix: remove --- horizontal lines (7 removed))
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== The following packages have been kept back<ref>https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it</ref> ==
{{Status
There are 3 categories of reasons for packages being kept back during <code>apt upgrade</code>
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}


* It is marked as held back
{{TOC}}


<code>apt-mark</code> can do this:
== Overview ==
<code>sudo apt-mark hold <package></code>
To list all packages marked on hold or find out if a package is on hold use:
<apt-mark showhold
apt-mark showhold <package></code>
To remove a hold on a package and allow it to be upgraded:
<code>sudo apt-mark unhold <package></code>


* <code>apt</code> detects a dependency change
Ubuntu tips and tricks에 대한 기술 문서입니다.


This will tell you the current and candidate upgrade versions of the package:
=== Summary ===
<code>$ apt list <package></code>
 
we can figure out the changed dependencies with <code>apt show</code>:
* 무엇인가? - Ubuntu tips and tricks
<code>apt show <package>=<old version> <package>=<new version></code>
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
The important parts are the <code>Depends</code> and <code>Recommends</code> package lists. If there are new packages in those lists in the new version of the kept back package, apt won't automatically upgrade it
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
 
 
== Purpose ==
 
이 문서가 존재하는 이유
 
* Goal: Ubuntu tips and tricks에 대한 기술 정보 제공
* Scope: Ubuntu tips and tricks의 개념, 사용법, 설정
* Non-goals: 다른 주제로의 확장


# To upgrade the package and install any new "Recommended" packages (i.e. as if newly installed with apt install <package>, use --with-new-pkgs:<syntaxhighlight lang="bash">
$sudo apt upgrade --with-new-pkgs <package>
(Tip: add --dry-run to see what will happen before doing it)
</syntaxhighlight>
# To upgrade the package without installing any newly added "Recommended" packages, use --only-upgrade.
<syntaxhighlight lang="bash">
$sudo apt install --only-upgrade <package>
</syntaxhighlight>


* Phased updates<br />You can check for phased updates with: <code>sudo apt -o APT::Get::Always-Include-Phased-Updates=true upgrade --dry-run</code>
== Key Concepts ==


== The following security updates require Ubuntu Pro with 'esm-infra' enabled ==
{| class="wikitable"
the file <code>/etc/apt/apt.conf.d/20apt-esm-hook.conf</code> provides the hook that calls the marketing message generation. Removing that is an option<ref>https://askubuntu.com/questions/1452299/im-getting-the-message-the-following-security-updates-require-ubuntu-pro-with</ref>
! Concept
! Description
! Related
|-
| Ubuntu tips and tricks
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}


<code>sudo mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /var/tmp</code>


after then  run <code>apt upgrade</code> the message does not show
== Detailed Explanation ==


== How to cleanly remove x11<ref>https://raspberrypi.stackexchange.com/questions/12670/how-to-cleanly-remove-x11</ref> ==
$ sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.d
Disable line that containes apt-pinvoke at /etc/apt/apt.conf.d/99needrestart<ref>https://serverfault.com/questions/1101391/disable-ubuntu-22-04s-scaning-processes-candidates-after-package-upgrades</ref>
To disable "Pending [[kernel]] upgrade" via command line:
vim /etc/needrestart/needrestart.conf then uncomment this line
<nowiki>#</nowiki>$nrconf{kernelhints} = -1;
Or just replace them in one line:
sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo apt purge 'x11-*'
$ mokutil --sb-state
sudo apt autoremove
SecureBoot disabled
</syntaxhighlight>
Platform is in Setup Mode
</syntaxhighlight>Ubuntu secure boot information<syntaxhighlight lang="bash">
$ mokutil --list-enrolled
[key 1]
SHA1 Fingerprint: 76:a0:92:06:58:00:bf:37:69:01:c3:72:cd:55:a9:0e:1f:de:d2:e0
Certificate:
    Data:
        Version: 3 (0x2)
        ....
    Signature Algorithm
 
 
== Best Practices ==


== apt-get update “the following signatures couldn’t be verified because the public key is not available” ==
* 최신 버전 사용 권장
<syntaxhighlight lang="bash">
* 공식 문서 참고
$ sudo apt update
* 테스트 환경에서 먼저 검증
Err:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05
 
#need to add the missing Key B53DC80D13EDEF05
$sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B53DC80D13EDEF05
Executing: /tmp/apt-key-gpghome.xfmtcCbrXz/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys B53DC80D13EDEF05
gpg: key B53DC80D13EDEF05: 1 duplicate signature removed
gpg: key B53DC80D13EDEF05: public key "Rapture Automatic Signing Key (cloud-rapture-signing-key-2022-03-07-08_01_01.pub)" imported
gpg: Total number processed: 1
gpg:              imported: 1


#now update will be successful
</syntaxhighlight>


== References ==
== References ==
<references />
 
* [https://wiki.hpcmate.com Ubuntu tips and tricks]
 
 
== Related Pages ==
 
* [[Linux]]
* [[Server]]
* [[Hardware]]
* [[Network]]
 
 
[[Category:Linux]]
== Knowledge Graph ==
 
Related
 
→ [[Linux]]
→ [[Server]]
→ [[Hardware]]
→ [[Network]]
 
[[Category:Guide]]

Latest revision as of 11:31, 17 July 2026

Template:Status

Template:TOC

Overview

Ubuntu tips and tricks에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Ubuntu tips and tricks
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: Ubuntu tips and tricks에 대한 기술 정보 제공
  • Scope: Ubuntu tips and tricks의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
Ubuntu tips and tricks HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

$ sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.d Disable line that containes apt-pinvoke at /etc/apt/apt.conf.d/99needrestart[1] To disable "Pending kernel upgrade" via command line: vim /etc/needrestart/needrestart.conf then uncomment this line #$nrconf{kernelhints} = -1; Or just replace them in one line: sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf

$ mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode

Ubuntu secure boot information<syntaxhighlight lang="bash">

$ mokutil --list-enrolled [key 1] SHA1 Fingerprint: 76:a0:92:06:58:00:bf:37:69:01:c3:72:cd:55:a9:0e:1f:de:d2:e0 Certificate:

   Data:
       Version: 3 (0x2)
       ....
   Signature Algorithm


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

LinuxServerHardwareNetwork