只有累積,沒有奇蹟

2019年2月12日 星期二

[Chocolatey] Chocolatey 常用指令大全

Chocolatey 指令大全 
這篇文章整理 Chocolatey 在使用時常用到的指令,方便自己後須用到或初老症狀病發還要再次 google
  • Search 搜尋 
  • List 列出清單
  • Install 安裝
  • Upgrade 升級
  • Uninstall 移除
  • Config 設定
  • Help   
Commands 
» Search Package 
  1. // search command : <filter>
  2. choco search git
  3.  
  4. @example
  5. // search exact name
  6. choco search git -e
  7.  
  8. // search id only
  9. choco search git --by-id-only
  10.  
  11. // search approved only
  12. choco search git --approved-only
  13.  
  14. // search local only
  15. choco search git -lo
» List Package 
  1. // list command : <filter>
  2. choco list git
  3.  
  4. @example
  5. // list local package
  6. choco list -lo
  7. choco list --local-only
  8.  
  9. // list already package on windows
  10. choco list -li
  11. choco list -lai
» Install  
  1. // install command : <filter>
  2. choco install git
  3.  
  4. @example
  5. // confirm all prompts
  6. choco install -y
  7.  
  8. // specific version
  9. choco install git --version 2.20.1
  10.  
  11. // prerelease
  12. choco install git --pre
» upgrade package  
  1. // upgrade command
  2. choco upgrade git
  3.  
  4. @example
  5. // upgrade all
  6. choco upgrade all
  7.  
  8. // upgrade all expect some
  9. choco upgrade all --except="'skype'"
» uninstall package 
  1. // uninstall command
  2. choco uninstall git
  3.  
  4. @example
  5. // uninstall specific version
  6. choco uninstall git --version 2.20.1
» Chocolatey Config  
  1. // config command
  2. choco config
  3.  
  4. @example
  5. // config list
  6. choco config list  
  7.  
  8. // get config
  9. choco config get cacheLocation
  10.  
  11. // set config
  12. choco config set cacheLocation d:\temp\choco
  13.  
  14. // config help
  15. choco config -h
» Help  
  1. // help command
  2. choco -h
  3.  
  4. @example
  5.  
  6. Commands
  7.  
  8. * list - lists remote or local packages
  9. * search - searches remote or local packages (alias for list)
  10. * info - retrieves package information. Shorthand for choco search pkgname --exact --verbose
  11. * install - installs packages from various sources
  12. * pin - suppress upgrades for a package
  13. * outdated - retrieves packages that are outdated. Similar to upgrade all --noop
  14. * upgrade - upgrades packages from various sources
  15. * uninstall - uninstalls a package
  16. * pack - packages up a nuspec to a compiled nupkg
  17. * push - pushes a compiled nupkg
  18. * new - generates files necessary for a chocolatey package from a template
  19. * sources - view and configure default sources (alias for source)
  20. * source - view and configure default sources
  21. * config - Retrieve and configure config file settings
  22. * features - view and configure choco features (alias for feature)
  23. * feature - view and configure choco features
  24. * setapikey - retrieves or saves an apikey for a particular source (alias for apikey)
  25. * apikey - retrieves or saves an apikey for a particular source
  26. * unpackself - have chocolatey set itself up
  27. * version - [DEPRECATED] will be removed in v1 - use `choco outdated` or `cup <pkg|all> -whatif` instead
  28. * update - [DEPRECATED] RESERVED for future use (you are looking for upgrade, these are not the droids you are looking for)
  29.  
  30. Default Options and Switches
  31.  
  32. -?, --help, -h
  33. Prints out the help menu.
  34.  
  35. -d, --debug
  36. Debug - Show debug messaging.
  37.  
  38. -v, --verbose
  39. Verbose - Show verbose messaging. Very verbose messaging, avoid using
  40. under normal circumstances.
  41.  
  42. --trace
  43. Trace - Show trace messaging. Very, very verbose trace messaging. Avoid
  44. except when needing super low-level .NET Framework debugging. Available
  45. in 0.10.4+.
  46.  
  47. --nocolor, --no-color
  48. No Color - Do not show colorization in logging output. This overrides
  49. the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+.
  50.  
  51. --acceptlicense, --accept-license
  52. AcceptLicense - Accept license dialogs automatically. Reserved for
  53. future use.
  54.  
  55. -y, --yes, --confirm
  56. Confirm all prompts - Chooses affirmative answer instead of prompting.
  57. Implies --accept-license
  58.  
  59. -f, --force
  60. Force - force the behavior. Do not use force during normal operation -
  61. it subverts some of the smart behavior for commands.
  62.  
  63. --noop, --whatif, --what-if
  64. NoOp / WhatIf - Don't actually do anything.
  65.  
  66. -r, --limitoutput, --limit-output
  67. LimitOutput - Limit the output to essential information
  68.  
  69. --timeout, --execution-timeout=VALUE
  70. CommandExecutionTimeout (in seconds) - The time to allow a command to
  71. finish before timing out. Overrides the default execution timeout in the
  72. configuration of 2700 seconds. '0' for infinite starting in 0.10.4.
  73.  
  74. -c, --cache, --cachelocation, --cache-location=VALUE
  75. CacheLocation - Location for download cache, defaults to %TEMP% or value
  76. in chocolatey.config file.
  77.  
  78. --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build
  79. AllowUnofficialBuild - When not using the official build you must set
  80. this flag for choco to continue.
  81.  
  82. --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output
  83. FailOnStandardError - Fail on standard error output (stderr), typically
  84. received when running external commands during install providers. This
  85. overrides the feature failOnStandardError.
  86.  
  87. --use-system-powershell
  88. UseSystemPowerShell - Execute PowerShell using an external process
  89. instead of the built-in PowerShell host. Should only be used when
  90. internal host is failing. Available in 0.9.10+.
  91.  
  92. --no-progress
  93. Do Not Show Progress - Do not show download progress percentages.
  94. Available in 0.10.4+.
  95.  
  96. --proxy=VALUE
  97. Proxy Location - Explicit proxy location. Overrides the default proxy
  98. location of ''. Available for config settings in 0.9.9.9+, this CLI
  99. option available in 0.10.4+.
  100.  
  101. --proxy-user=VALUE
  102. Proxy User Name - Explicit proxy user (optional). Requires explicity
  103. proxy (`--proxy` or config setting). Overrides the default proxy user of
  104. ''. Available for config settings in 0.9.9.9+, this CLI option available
  105. in 0.10.4+.
  106.  
  107. --proxy-password=VALUE
  108. Proxy Password - Explicit proxy password (optional) to be used with
  109. username. Requires explicity proxy (`--proxy` or config setting) and
  110. user name. Overrides the default proxy password (encrypted in settings
  111. if set). Available for config settings in 0.9.9.9+, this CLI option
  112. available in 0.10.4+.
  113.  
  114. --proxy-bypass-list=VALUE
  115. ProxyBypassList - Comma separated list of regex locations to bypass on
  116. proxy. Requires explicity proxy (`--proxy` or config setting). Overrides
  117. the default proxy bypass list of ''. Available in 0.10.4+.
  118.  
  119. --proxy-bypass-on-local
  120. Proxy Bypass On Local - Bypass proxy for local connections. Requires
  121. explicity proxy (`--proxy` or config setting). Overrides the default
  122. proxy bypass on local setting of 'True'. Available in 0.10.4+.
  123.  
  124. --log-file=VALUE
  125. Log File to output to in addition to regular loggers. Available in 0.1-
  126. 0.8+.
  127. Chocolatey v0.10.11

參考
chocolatey.org

Related Posts:

  • [Chocolatey] Chocolatey 常用指令大全 Chocolatey 指令大全  這篇文章整理 Chocolatey 在使用時常用到的指令,方便自己後須用到或初老症狀病發還要再次 google Search 搜尋  List 列出清單 Install 安裝 Upgrade 升級 Uninstall 移除 Config 設定 Help    Commands  » Search Package  // search comman… Read More
  • [Chocolatey] Windows 套件管理工具 - Chocolatey 初體驗前言  之前在外面上課時就聽過講師介紹 chocolatey 套件管理工具,但當時趕專案上線就沒有再深入研究,直到最近要在公司筆電安裝軟體才想起 Windows 有此神奇的套件管理神器,今天就針對此神器筆記安裝與功能介紹,避免初老症狀病發還要再次請教 google 大神。  Chocolatey 是什麼 可以吃嗎 ? 在過去在 Windows 安裝軟體應用程式時,需要下載安裝檔與使用其軟體安裝流程步驟等各種 GUI 介面… Read More
  • [Chocolatey] 設定 Package 安裝路徑問題  在前一篇介紹 Chocolatey 使用初體驗,文章最後 demo 下載 Winrar 軟體顯示其強大威力,當使用過 Chocolatey 下載 package 後預設路徑是在 C 槽底下,由於個人習慣安裝與下載資料夾都在另外的 D 槽環境,今天要分享的是如何修改 chocolatey 預設下載路徑的設定方式。  設定安裝路徑 Chocolatey 預設下載路徑為 C:\Users\… Read More

0 意見:

張貼留言

Copyright © 2025 m@rcus 學習筆記 | Powered by Blogger

Design by Anders Noren | Blogger Theme by NewBloggerThemes.com