Scoop - 在Windows命令行上进行程序安装
2019-01-28? 22:49:21 资料来源自Scoop官方网站以及github上的帮助文档 如果有疑惑或者觉得文章有错误请留言以帮助改正 ? Scoop -- A command-line installer for Windows是开发人员用来安装程序用的,使用命令行进行操作。 安装前提(所需要的环境):操作环境:win10。 确保你的?PowerShell 版本 >= 3. win7或许低于3,得升级。 PowerShell在哪里?以下三种方法可找到: 1. win + R 打开运行后输入powershell然后确定;(和环境变量有关) 2. cmd中输入powershell然后回车;(和环境变量有关) 3. 在开始菜单中查找; 如何查看自己的PowerShell 版本呢?在PowerShell中输入如下内容: $psversiontable.psversion.major
本人电脑上显示如下: 1 PS C:Usersuser> $psversiontable.psversion.major 2 5 然后确保你允许PowerShell执行本地脚本,在PowerShell中输入如下内容,已完成执行策略的更改: set-executionpolicy remotesigned -scope currentuser 遇到提示,输入Y即可。 开始安装Scoop.在PowerShell中输入如下内容(将会安装到默认目录C:Usersuser(自己的用户名)scoop,也可指定安装目录): iex (new-object net.webclient).downloadstring(‘https://get.scoop.sh‘) 想要指定安装目录,在PowerShell中输入如下内容(代码中的D:ApplicationsScoop为指定的目录): [environment]::setEnvironmentVariable(‘SCOOP‘,‘D:ApplicationsScoop‘,‘User‘) $env:SCOOP=‘D:ApplicationsScoop‘ iex (new-object net.webclient).downloadstring(‘https://get.scoop.sh‘) 等待安装完成。。。 使用Scoop(在cmd和PowerShell中输入以下命令均可,因为已经为Scoop自动设置了环境变量)。输入以下命令查看Scoop命令的概述: scoop help 结果显示如下: 1 PS C:Users15991> scoop help 2 Usage: scoop <command> [<args>] 3 4 Some useful commands are: 5 6 alias Manage scoop aliases 7 bucket Manage Scoop buckets 8 cache Show or clear the download cache 9 checkup Check for potential problems 10 cleanup Cleanup apps by removing old versions 11 config Get or set configuration values 12 create Create a custom app manifest 13 depends List dependencies for an app 14 export Exports (an importable) list of installed apps 15 help Show help for a command 16 home Opens the app homepage 17 info Display information about an app 18 install Install apps 19 list List installed apps 20 prefix Returns the path to the specified app 21 reset Reset an app to resolve conflicts 22 search Search available apps 23 status Show status and check for new app versions 24 uninstall Uninstall an app 25 update Update apps,or Scoop itself 26 virustotal Look for app‘s hash on virustotal.com 27 which Locate a shim/executable (similar to ‘which‘ on Linux) 28 29 30 Type ‘scoop help <command>‘ to get help for a specific command. 输入‘scoop help <command>‘可以查看具体的某个命令的用法,如下所示: scoop help install 显示结果如下: 1 PS C:Users15991> scoop help install 2 Usage: scoop install <app> [options] 3 4 e.g. The usual way to install an app (uses your local ‘buckets‘): 5 scoop install git 6 7 To install an app from a manifest at a URL: 8 scoop install https://raw.github.com/lukesampson/scoop/master/bucket/runat.json 9 10 To install an app from a manifest on your computer 11 scoop install pathtoapp.json 12 13 When installing from your computer,you can leave the .json extension off if you like. 14 15 Options: 16 -g,--global Install the app globally 17 -i,--independent Don‘t install dependencies automatically 18 -k,--no-cache Don‘t use the download cache 19 -s,--skip Skip hash validation (use with caution!) 20 -a,--arch <32bit|64bit> Use the specified architecture,if the app supports it 查找要安装的程序,如gradle: scoop search gradle 显示结果如下: 1 PS C:Users15991> scoop search gradle 2 ‘main‘ bucket: 3 gradle-bin (5.1.1) 4 gradle (5.1.1) 查找所有可用程序: scoop search ? 安装程序,如gradle,默认会安装到Scoop安装目录下的apps目录: scoop install gradle 显示结果如下: 1 PS C:Users15991> scoop install gradle 2 Installing ‘gradle‘ (5.1.1) [32bit] 3 gradle-5.1.1-all.zip (124.7 MB) [> ] 1% 也可将程序安装到指定目录,如F:GlobalScoopApps: [environment]::setEnvironmentVariable(‘SCOOP_GLOBAL‘,‘F:GlobalScoopApps‘,‘Machine‘) $env:SCOOP_GLOBAL=‘F:GlobalScoopApps‘ scoop install -g <app> 对Scoop进行版本更新: scoop update 对Scoop安装的所有程序进行更新(也可指定某个程序进行更新): scoop update * (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 在Hyper-V中创建的.vhd文件与在Win 7中创建的.vhd文件之间是
- 来自Windows服务的WNetAddConnection2
- Windows任务计划程序C#中的计划任务
- windows-vista – 让Windows Vista使用我们的域服务器时间
- Windows+MyEclipse+MySQL【连接数据库报错caching_sha2_pas
- 如何为Windows安装开源Qt库5二进制版本
- winapi – 调用Win32函数在Lua中返回带外星人的字符串
- Windows Phone 7 – 如何在LongListSelector中包含ItemsPan
- 转-内网穿透
- for-loop – 单行语句:%% i’意外在这个时候’
- cygwin – 用Cywgin启动X.
- windows – 如何创建Win32控件以包含其他Win32控
- windows-server-2012 – 如何在Windows Server 2
- windows – 什么是REBASE.EXE的替代品?
- windows – slmgr.vbs supress对话框
- .net – System.Diagnostics.EventLog – 连接到
- windows-7 – 如何使用IE10获取HTML5视频
- active-directory – Active Directory管理中心
- windows下安装mysql5.7
- 如何在win7 x64上使用带有php(xampp)的oracle客户