mac app store_如何从终端更新或安装Mac App Store软件

mac app store_如何从终端更新或安装Mac App Store软件

mac app store

mac app store_如何从终端更新或安装Mac App Store软件

There’s no getting around it: the Mac App Store is slow. If you try to avoid opening it whenever possible, you’re probably pretty annoyed when you see the update notification in the menu bar. You’ve got to open the App Store, click the “Updates” button, and wait while the application is “Checking for Updates.”

无法解决:Mac App Store运行缓慢。 如果您尝试避免尽可能地将其打开,则在菜单栏中看到更新通知时,您可能会非常恼火。 您必须打开App Store,单击“更新”按钮,然后在应用程序“正在检查更新”时等待。

It’s checking. For updates. Which it already did, because it just told you about how many updates you have. Ugh.

正在检查。 有关更新。 它已经做了,因为它只是告诉您您有多少更新。 啊。

This is why you should manage your App Store purchases from the Terminal instead. A free program called mas (stands for “Mac App Store”) lets you quickly check for and install updates, in moments. You can also quickly search for software, and even install things that you’ve already purchased. Let’s set it up now, so you never have to see “Checking for Updates” ever again.

这就是为什么您应该从终端管理App Store购买的原因。 一个名为mas (代表“ Mac App Store”)的免费程序,使您可以立即快速检查和安装更新。 您还可以快速搜索软件,甚至安装已经购买的东西。 现在就进行设置,这样您就不必再看到“检查更新”了。

安装mas (Installing mas)

RELATED: How to Install Packages with Homebrew for OS X

相关: 如何使用Homebrew for OS X安装软件包

We’ve shown you how to install Mac software with Homebrew, and that’s the easiest way to get started with mas. Our advice: set up Homebrew before you get started, using our instructions.

我们已经向您展示了如何使用Homebrew安装Mac软件 ,这是开始使用mas的最简单方法。 我们的建议: 按照我们的说明在开始之前设置Homebrew。

Once Homebrew is installed, head to the Terminal, which you can find in Applications > Utilities. Type brew install mas , then hit Return. In a few moments mas will be installed; you’re now ready to upgrade your software from the Mac App Store.

安装Homebrew后,转到终端,您可以在“应用程序”>“实用程序”中找到该终端。 键入brew install mas ,然后单击Return。 过一会儿就会安装mas。 您现在可以从Mac App Store升级软件了。

If you’d rather not set up Homebrew, check the mas page on Github for build instructions. Seriously, though: just use Homebrew. It’s a lot easier, and if you like using the Terminal, chance are you’ll come across it again in the future.

如果您不想设置Homebrew,请查看Github上mas页面以获取构建说明。 严重的是:使用Homebrew。 这要容易得多,如果您喜欢使用终端机,将来有可能再次遇到它。

如何在不启动Mac App Store的情况下更新软件 (How Update Software Without Launching the Mac App Store)

The biggest use for this software, in my opinion, is installing updates. To see a list of apps that need updates, type mas outdated and hit Return. It will present a list of apps that need updating.

我认为,此软件的最大用途是安装更新。 要查看需要更新的应用程序列表,请输入mas outdated并点击Return。 它将显示需要更新的应用程序列表。

mac app store_如何从终端更新或安装Mac App Store软件

To update everything listed, just type mas upgrade and hit return.

要更新列出的所有内容,只需输入mas upgrade并按回车即可。

mac app store_如何从终端更新或安装Mac App Store软件

That’s it: your upgrades are now installed. Head to the Mac App Store if you don’t believe me—it won’t find any updates for you.

就是这样:现在已经安装了升级。 如果您不相信我,请前往Mac App Store-它不会为您找到任何更新。

If you want to upgrade only one application, you can do that too. Let’s look again at the output from mas outdated:

如果您只想升级一个应用程序,则也可以这样做。 让我们再次看一下mas outdated的输出:

mac app store_如何从终端更新或安装Mac App Store软件

See how there’s a number before the name of the application? Copy that number, and paste it at the end of mas oudated to upgrade only that program.

看看应用程序名称前有一个数字吗? 复制这个数字,并在末尾处粘贴mas oudated只升级该程序。

如何在不启动Mac App Store的情况下搜索和安装软件 (How to Search for and Install Software Without Launching the Mac App Store)

If you’re not sure whether a particular application is in the App Store or not, you can quickly search the entire store by typing mas search followed by what you’re looking for, then hitting Return.

如果不确定某个应用程序是否在App Store中,则可以通过键入mas search后跟您要查找的内容,然后按Return键来快速搜索整个商店。

mac app store_如何从终端更新或安装Mac App Store软件

You can even install software you find this way, by typing mas install followed by the number of the corresponding app from the search results.

您甚至可以通过以下方式安装找到的软件:输入mas install然后输入搜索结果中相应应用的编号。

mac app store_如何从终端更新或安装Mac App Store软件

Note that you can only install applications that you “purchased” inside the Mac App Store. Sadly, this includes free applications. For this reason the “install” functionality is less useful than it could be, but it’s still a quick way to install software you know that you’ve already purchased.

请注意,您只能安装在Mac App Store中“购买”的应用程序。 可悲的是,这包括免费的应用程序。 因此,“安装”功能的作用不如可能,但它仍然是安装已购买的软件的快速方法。

您应该知道的其他mas命令 (Other mas Commands You Should Know)

If you want a list of every Mac App Store application currently installed on your system, simply type mas list then hit Return.

如果要获取系统上当前安装的每个Mac App Store应用程序的mas list ,只需键入mas list然后单击Return。

mac app store_如何从终端更新或安装Mac App Store软件

You can also sign into the Mac App Store, if you’ve never done so, with the command mas signin followed by the email address associated with your account. To sign out, you can use mas signout.

如果您从未登录过Mac App Store,也可以使用mas signin命令后跟与您的帐户关联的电子邮件地址mas signin 。 要注销,您可以使用mas signout

And that’s about it! This tool won’t let you avoid the Mac App Store entirely, but it can make your visits a lot less frequent, and that’s a great thing. If nothing else, it will be how I install updates from now on.

就是这样! 该工具不会让您完全避开Mac App Store,但可以减少访问频率,这是一件好事。 如果没有其他问题,这将是我从现在开始安装更新的方式。

翻译自: https://www.howtogeek.com/291287/how-to-update-or-install-mac-app-store-software-from-the-terminal/

mac app store