Useful Commands/Package Management: Difference between revisions
Jump to navigation
Jump to search
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Ubuntu == | |||
=== apt === | |||
{| class="wikitable" | |||
! 🎯 Purpose || ⌨️ Command | |||
|- | |||
| List how many top packages installed by me. || | |||
<syntaxhighlight lang="bash"> | |||
apt-mark showmanual | grep -E 'top$' | |||
</syntaxhighlight> | |||
|- | |||
| Show version info of a package not installed. || | |||
<syntaxhighlight lang="bash"> | |||
apt-cache show openssl | |||
</syntaxhighlight> | |||
|} | |||
=== snap === | |||
{| class="wikitable" | |||
! 🎯 Purpose || ⌨️ Command | |||
|- | |||
| Install package || | |||
<syntaxhighlight lang="bash"> | |||
sudo snap install astral-uv --classic | |||
</syntaxhighlight> | |||
|- | |||
| Update package || | |||
<syntaxhighlight lang="bash"> | |||
sudo snap refresh nvtop | |||
</syntaxhighlight> | |||
|} | |||
=== Legacy === | |||
{| class="wikitable" | |||
! 🎯 Purpose || ⌨️ Command | |||
|- | |||
| List files owned by package || | |||
<syntaxhighlight lang="bash"> | |||
dpkg -L openvino-2026.2.1 | |||
</syntaxhighlight> | |||
|- | |||
| List all packages installed. || | |||
<syntaxhighlight lang="bash"> | |||
dpkg --get-selections | |||
</syntaxhighlight> | |||
|- | |||
| Show version info of a package installed. || | |||
<syntaxhighlight lang="bash"> | |||
dpkg -s openssl | grep '^Version' | |||
</syntaxhighlight> | |||
|} | |||
== Windows == | == Windows == | ||
| Line 62: | Line 117: | ||
* Python / Go / Rust | * Python / Go / Rust | ||
* Neovim / kubectl / 7zip | * Neovim / kubectl / 7zip | ||
|} | |} | ||
Latest revision as of 14:28, 29 September 2026
Ubuntu
apt
| 🎯 Purpose | ⌨️ Command |
|---|---|
| List how many top packages installed by me. |
apt-mark showmanual | grep -E 'top$'
|
| Show version info of a package not installed. |
apt-cache show openssl
|
snap
| 🎯 Purpose | ⌨️ Command |
|---|---|
| Install package |
sudo snap install astral-uv --classic
|
| Update package |
sudo snap refresh nvtop
|
Legacy
| 🎯 Purpose | ⌨️ Command |
|---|---|
| List files owned by package |
dpkg -L openvino-2026.2.1
|
| List all packages installed. |
dpkg --get-selections
|
| Show version info of a package installed. |
dpkg -s openssl | grep '^Version'
|
Windows
general
| 🎯 Purpose | ⌨️ Command |
|---|---|
| Install scoop |
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
|
| Get path of an executable |
gcm php
Don't use where php, it's very slow. |
winget
| Purpose | RunAs | Command |
|---|---|---|
| Install PowerShell | Required |
winget install --id Microsoft.PowerShell --source winget --installer-type wix --override "CREATE_DESKTOP_SHORTCUT=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1"
Don't install with default options. |
| Update package list |
winget source update
|
scoop
| Purpose | RunAs | Command |
|---|---|---|
| Update package list |
scoop update
|
Division Architecture
| WinGet (For all GUI applications) |
Scoop (For all CLI & development tools) |
|---|---|
|
|
OSX
| 🎯 Purpose | ⌨️ Command |
|---|---|
| Install beta package |
$ brew info jython
jython: stable 2.5.3, devel 2.7-b1
...
$ brew install --devel jython
|
| List compiling options of a package for brew install |
# version / dependencies / build options
brew info graphviz
# build options only
brew options graphviz
|
| Remove unused packages. This action could make self-compiling executables miss link for libraries (*.so, *.dylib) |
brew cleanup
brew cleanup $FORMULA
brew cleanup -n # dry-run
|