Useful Commands/Package Management: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (32 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | == Windows == | ||
=== general === | |||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Purpose || Command | ||
|- | |- | ||
| | | Install scoop || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
| | | Get path of an executable || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
gcm php | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Don't use '''where php''', it's very slow. | |||
|} | |||
=== winget === | |||
{| class="wikitable" | |||
! Purpose || RunAs || Command | |||
|- | |- | ||
| | | Install PowerShell || Required || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
winget install --id Microsoft.PowerShell --source winget --installer-type wix --override "CREATE_DESKTOP_SHORTCUT=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Don't install '''with default options'''. | |||
|- | |- | ||
| | | Update package list || || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
winget source update | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |||
=== scoop === | |||
{| class="wikitable" | |||
! Purpose || RunAs || Command | |||
|- | |- | ||
| | | Update package list || || | ||
<syntaxhighlight lang="bash"> | |||
scoop update | |||
</syntaxhighlight> | |||
|} | |} | ||
== | === Division Architecture === | ||
{| class="wikitable" | {| class="wikitable" | ||
! | ! WinGet<br /><small>(For all GUI applications)</small> | ||
! Scoop<br /><small>(For all CLI & development tools)</small> | |||
|- | |- | ||
| style="vertical-align: top; text-align: left;" | | |||
* Chrome / Edge | |||
* VS Code / JetBrains | |||
* Docker / Git | |||
* Discord / Spotify | |||
| style="vertical-align: top; text-align: left;" | | |||
* PHP / Composer | |||
* Node.js / NVM / Bun | |||
* Python / Go / Rust | |||
* Neovim / kubectl / 7zip | |||
|} | |||
== Ubuntu == | |||
{| class="wikitable" | |||
! Purpose || Command | |||
|- | |- | ||
| | | List how many top packages installed by me. || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
apt-mark showmanual | grep -E 'top$' | |||
$ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
| | | List files owned by package || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
dpkg -L openvino-2026.2.1 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
| | | List all packages installed. || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
dpkg --get-selections | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
| Show version info of a package not installed. || | |||
<syntaxhighlight lang="bash"> | |||
sudo apt-cache show openssl | |||
</syntaxhighlight> | |||
|- | |- | ||
| | | Show version info of a package installed. || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
dpkg -s openssl | grep '^Version' | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |||
== OSX == | |||
{| class="wikitable" | |||
! Purpose || Command | |||
|- | |- | ||
| | | Install beta package || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ brew info jython | |||
jython: stable 2.5.3, devel 2.7-b1 | |||
... | |||
$ brew install --devel jython | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
| | | List compiling options of a package for brew install || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# version / dependencies / build options | |||
brew info graphviz | |||
# build options only | |||
brew options graphviz | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
| | | Remove unused packages.<br/>This action could make self-compiling executables miss link for libraries (*.so, *.dylib) || | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
brew cleanup | |||
brew cleanup $FORMULA | |||
brew cleanup -n # dry-run | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Latest revision as of 02:35, 21 July 2026
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) |
|---|---|
|
|
Ubuntu
| Purpose | Command |
|---|---|
| List how many top packages installed by me. |
apt-mark showmanual | grep -E 'top$'
|
| List files owned by package |
dpkg -L openvino-2026.2.1
|
| List all packages installed. |
dpkg --get-selections
|
| Show version info of a package not installed. |
sudo apt-cache show openssl
|
| Show version info of a package installed. |
dpkg -s openssl | grep '^Version'
|
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
|