在 Arch Linux 上安装 Brave
Brave
![](/data/attachment/album/202310/17/103648le2r0e688pef1v22.jpg)



> 
> 在这篇初学者教程中，学习在 Arch Linux 中安装 Brave 浏览器。
> 
> 
> 


Firefox 和 Brave 是我日常浏览网页的程序。


当我安装带有 GNOME 的 Arch Linux 时，它有 GNOME Web 浏览器。这是一个不错的浏览器，但我不能接受它，因为我需要保存的密码、浏览历史记录和插件。


因此，我开始安装我最喜欢的网络浏览器，因此本教程是关于在 Arch Linux 中安装 Brave。


如果你安装了 Yay（或任何其他 AUR 帮助程序），那么安装 Brave 就像使用以下命令一样简单：



```
yay -S brave-bin

```

是的！就这么简单。让我们详细看看。



> 
> ? Manjaro 内置了 AUR 支持。你可以使用 Pamac 软件中心或 `pamac`/`pacman` 命令在 Manjaro 中安装 Brave。
> 
> 
> 


### 在 Arch Linux 上安装 Brave 浏览器


Brave 在官方 Arch 仓库中不可用。但是，它可以在 AUR（Arch 用户仓库）中使用，并且可以使用 Yay 等 AUR 帮助程序轻松安装。


如果你没有 Yay 或任何其他 AUR 帮助程序，请逐一使用这些命令来 [安装 Yay](https://itsfoss.com/install-yay-arch-linux/)：



```
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

```

安装 Yay 后，用它来安装 Brave：



```
yay -S brave-bin

```

不用担心。它最终会要求你输入密码。


如果这是你第一次安装浏览器，系统可能会要求你选择字体提供方。使用默认选择或选择任何其他选项。


![](/data/attachment/album/202310/17/103837ipp9rlttr0gmcctr.png)


接下来，它会询问你有关清理构建的问题。Yay 询问你是否应该重新下载软件包（和依赖项）并再次构建它或使用早期构建的缓存（如果有）。


你可以按回车键继续操作，这应该意味着不清理构建。


![](/data/attachment/album/202310/17/103838fcdl6mflwf9ah6tq.png)


事实上，当你看到默认选项时，你可以继续按回车键。


在实际安装之前，系统会要求你输入帐户密码。输入你的密码并继续该过程。它将下载大小约为 350 MB 的文件：


![](/data/attachment/album/202310/17/103838qyzf2vqbsdv7a5vw.png)


安装后，在系统菜单中查找 [Brave browser](https://brave.com/) 并从那里运行它。


![](/data/attachment/album/202310/17/103838k46md8u4i6zuals2.png)


### 保持 Brave 更新


你可以使用以下命令更新通过 Yay 安装的 AUR 软件包来保持 Brave 浏览器更新：



```
yay -Sua

```

### 从 Arch 中删除 Brave


不喜欢 Brave？ 不用担心。你可以轻松将其删除。


与任何其他软件一样，使用 `pacman` 命令从 Arch 中删除 Brave：



```
sudo pacman -Rs brave-bin

```

### 总结


AUR 再次拯救你！ 安装 Brave 变得非常简单。


顺便说一句，我注意到 Brave 不知何故成为打开图像的默认应用。这意味着，双击图像将在新的 Brave 窗口中打开它们。


我必须通过右键单击图像并选择“打开方式”选项再次将图像查看器设置为默认值。


![Somehow Brave becomes the default image viewer. You should change it](/data/attachment/album/202310/17/103839m31iwwhqqjjlvvw8.png)


在接下来的几天里，我将分享更多我的 Arch 经验。敬请关注！


*（题图：MJ/46bf8413-5fe1-41aa-b6f3-a5e660efce2b）*




---


via: <https://itsfoss.com/install-brave-arch-linux/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

Firefox and Brave are my daily drivers for web browsing.

When I installed Arch Linux with GNOME, it had GNOME Web browser. It's a decent browser but not something I can live with it as I need my saved passwords, browsing history and plugins.

So, I started out to install my favorite web browsers and hence this tutorial on getting Brave in Arch Linux.

If you have Yay (or any other AUR helper) installed, installing Brave is as simple as using this command:

`yay -S brave-bin`


Yeah! That simple. Let's see it in detail.

## Installing Brave browser on Arch Linux

Brave is not available in the official Arch repositories. However, it is available in the AUR (Arch User Repository) and can be easily installed using an AUR helper like Yay.

If you don't have Yay or any other AUR helper, use these commands one by one to [install Yay](https://itsfoss.com/install-yay-arch-linux/):

```
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
```


Once you have got Yay, use it to install Brave:

`yay -S brave-bin`


Don't worry. It will ask for your password eventually.

If this is your first time installing a browser, you may be asked to choose a font provider. Go with the default choice or choose any of the other.

![During Brave installation, you may be asked to choose fonts](https://itsfoss.com/content/images/2023/10/yay-install-brave-font-install.png)

Next, it will ask you about clean build. Yay asks you if it should redownload the packages (and dependencies) and build it again or use the cache from an earlier build (if there is any).

You can go on with it by pressing enter, which should mean No to clean build.

![No need for clean build with yay](https://itsfoss.com/content/images/2023/10/clean-build-yay.png)

In fact, you can just keep on pressing enter when you are presented with choices to with the default one.

Just before the actual installation, you'll be asked to enter your account password. Enter your password and go on with the process. It will download files of around 350 MB in size:

![Installing Brave](https://itsfoss.com/content/images/2023/10/installing-brave-arch-linux.png)

Once installed, look for [Brave browser](https://brave.com/) in the system menu and run it from there.

![Running Brave in Arch Linux](https://itsfoss.com/content/images/2023/10/run-brave-arch-linux.png)

## Keeping Brave updated

You can keep the Brave browser updated by updating the AUR packages installed with yay using this command:

`yay -Sua`


## Removing Brave from Arch

Don't like Brave? No worries. You can easily remove it.

Like any other software, remove Brave from Arch using pacman command:

`sudo pacman -Rs brave-bin`


## Conclusion

AUR comes to the rescue, once again! Installing Brave becomes an easy task with it.

By the way, I noticed that somehow Brave became the default application for opening images. Which means, double clicking on images were opening them in a new Brave window.

I had to make Image Viewer default again by right clicking an image, and going to "open with" option.

![Somehow Brave becomes the default image viewer. You should change it](https://itsfoss.com/content/images/2023/10/open-images-in-viewer-not-brave.png)

I'll be sharing more of my Arch experience in the coming days. Stay tuned!