mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-13 22:30:37 +08:00
TSL
This commit is contained in:
parent
54c19dda69
commit
222cdd8079
@ -1,170 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (You can Surf Internet in Linux Terminal With These Command Line Browsers)
|
||||
[#]: via: (https://itsfoss.com/terminal-web-browsers/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
You can Surf Internet in Linux Terminal With These Command Line Browsers
|
||||
======
|
||||
|
||||
I’m guessing that you are probably using Firefox or a Chrome-based browser like [Brave][1] to read this article. Or, maybe, Google Chrome or [Chromium][2].
|
||||
|
||||
In other words, you are utilizing a GUI-based approach to browse the web. However, back in the days, people used the terminal to fetch resources and browse the web because everything was mostly text-based information.
|
||||
|
||||
Even though you cannot get every information from a terminal now, you can still try the command line browsers for some text-based information and open a web page from the Linux terminal.
|
||||
|
||||
Not just limited to that, but if you are accessing a remote server or stuck in a terminal without a GUI, a terminal web browser can prove to be useful as well.
|
||||
|
||||
So, in this article, I will be mentioning some terminal based web browsers that you can try on Linux.
|
||||
|
||||
### Best Terminal-based Web Browsers for Linux Users
|
||||
|
||||
_**Note:** The list is in no particular order of ranking._
|
||||
|
||||
#### 1\. W3M
|
||||
|
||||
![][3]
|
||||
|
||||
w3m is a popular open-source text-based web browser for the terminal. Even though the original project is no longer active, an active version of it is being maintained by a different developer Tatsuya Kinoshita.
|
||||
|
||||
w3m is quite simple, supports SSL connections, colors, and in-line images as well. Of course, depending on what resource you are trying to access, things might look different on your end. As per my quick test, it didn’t seem to load up [DuckDuckGo][4] but I could [use Google in terminal][5] just fine.
|
||||
|
||||
You can simply type **w3m** in the terminal to get help after installation. If you’re curious, you can also check out the repository at [GitHub][6].
|
||||
|
||||
##### How to install and use w3m?
|
||||
|
||||
W3M is available on most of the default repositories for any Debian-based Linux distribution. If you have an Arch-based distro, you might want to check [AUR][7] if it’s not available directly.
|
||||
|
||||
For Ubuntu, you can install it by typing in:
|
||||
|
||||
```
|
||||
sudo apt install w3m w3m-img
|
||||
```
|
||||
|
||||
Here, we are installing the w3m package along with image extension for in-line image support. Next, to get started, you have to simply follow the command below:
|
||||
|
||||
```
|
||||
w3m xyz.com
|
||||
```
|
||||
|
||||
Of course, you need to replace xyz.com to any website that you want to browse/test. Finally, you should know that you can use the keyboard arrow keys to navigate and press enter when you want to take an action.
|
||||
|
||||
To quit, you can press **SHIFT+Q**, and to go back to the previous page — **SHIFT+B**. Additional shortcuts include **SHIFT + T** to open a new tab and **SHIFT + U** to open a new URL.
|
||||
|
||||
You can explore more about it by heading to its man page as well.
|
||||
|
||||
#### 2\. Lynx
|
||||
|
||||
![][8]
|
||||
|
||||
Lynx is yet another open source command line browser which you can try. Fortunately, more websites tend to work when using Lynx, so I’d say it is definitely better in that aspect. I was able to load up DuckDuckGo and make it work.
|
||||
|
||||
In addition to that, I also noticed that it lets you accept/deny cookies when visiting various web resources. You can set it to always accept or deny as well. So, that’s a good thing.
|
||||
|
||||
On the other hand, the window does not re-size well while using it from the terminal. I haven’t looked for any solutions to that, so if you’re trying this out, you might want to do that. In either case, it works great and you get all the instructions for the keyboard shortcuts right when you launch it in the terminal.
|
||||
|
||||
Note that it does not match the system terminal theme, so it will look different no matter how your terminal looks like.
|
||||
|
||||
##### How to install Lynx?
|
||||
|
||||
Unlike w3m, you do get some Win32 installers if you’re interested to try. But, on Linux, it is available on the most of the default repositories.
|
||||
|
||||
For Ubuntu, you just need to type in:
|
||||
|
||||
```
|
||||
sudo apt install lynx
|
||||
```
|
||||
|
||||
To get started, you just have to follow the command below:
|
||||
|
||||
```
|
||||
lynx examplewebsite.com
|
||||
```
|
||||
|
||||
Here, you just need to replace the example website with the resource you want to visit.
|
||||
|
||||
If you want to explore the packages for other Linux distros, you can check out their [official website resources][9].
|
||||
|
||||
#### 3\. Links2
|
||||
|
||||
![][10]
|
||||
|
||||
Links2 is an interesting text-based browser that you can easily utilize on your terminal with a good user experience. It gives you a nice interface to type in the URL and then proceed as soon as you launch it.
|
||||
|
||||
![][11]
|
||||
|
||||
It is worth noting that the theme will depend on your terminal settings, I have it set as “black-green”, hence this is what you see. Once you launch it as a command line browser, you just need to press any key to bring the URL prompt or Q to quit it. It works good enough and renders text from most of the sites.
|
||||
|
||||
Unlike Lynx, you do not get the ability to accept/reject cookies. Other than that, it seems to work just fine.
|
||||
|
||||
##### How to install Links2?
|
||||
|
||||
As you’d expect, you will find it available in the most of the default repositories. For Ubuntu, you can install it by typing the following command in the terminal:
|
||||
|
||||
```
|
||||
sudo apt install links2
|
||||
```
|
||||
|
||||
You can refer to its [official][12] [][12][website][12] for packages or documentations if you want to install it on any other Linux distribution.
|
||||
|
||||
#### 4\. eLinks
|
||||
|
||||
![][13]
|
||||
|
||||
eLinks is similar to Links2 — but it is no longer maintained. You will still find it in the default repositories of various distributions, hence, I kept it in this list.
|
||||
|
||||
It does not blend in with your system terminal theme. So, this may not be a pretty experience as a text-based browser without a “dark” mode if you needed that.
|
||||
|
||||
##### How to install eLinks?
|
||||
|
||||
On Ubuntu, it is easy to install it. You just have to type in the following in the terminal:
|
||||
|
||||
```
|
||||
sudo apt install elinks
|
||||
```
|
||||
|
||||
For other Linux distributions, you should find it available on the standard repositories. But, you can refer to the [official installation instructions][14] if you do not find it in the repository.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
It’s no surprise that there aren’t a lot of text-based web browsers to run on the terminal. Some projects like [Browsh][15] have tried to present a modern Linux command-line browser but it did not work in my case.
|
||||
|
||||
While tools like curl and wget allow you to [download files from the Linux command line][16], these terminal-based web browsers provide additional features.
|
||||
|
||||
In addition to command-line browsers, you may also like to try some [command line games for Linux][17], if you want to play around in the terminal.
|
||||
|
||||
What do you think about the text-based web browsers for Linux terminal? Feel free to let me know your thoughts in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/terminal-web-browsers/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/brave-web-browser/
|
||||
[2]: https://itsfoss.com/install-chromium-ubuntu/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/w3m-google.jpg?resize=800%2C463&ssl=1
|
||||
[4]: https://duckduckgo.com/
|
||||
[5]: https://itsfoss.com/review-googler-linux/
|
||||
[6]: https://github.com/tats/w3m
|
||||
[7]: https://itsfoss.com/aur-arch-linux/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/lynx-terminal.jpg?resize=800%2C497&ssl=1
|
||||
[9]: https://lynx.invisible-island.net/lynx-resources.html
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/links2-terminal.jpg?resize=800%2C472&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/links2-terminal-welcome.jpg?resize=800%2C541&ssl=1
|
||||
[12]: http://links.twibright.com/download.php
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/elinks-terminal.jpg?resize=800%2C465&ssl=1
|
||||
[14]: http://elinks.or.cz/documentation/installation.html
|
||||
[15]: https://www.brow.sh/
|
||||
[16]: https://itsfoss.com/download-files-from-linux-terminal/
|
||||
[17]: https://itsfoss.com/best-command-line-games-linux/
|
@ -0,0 +1,170 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (You can Surf Internet in Linux Terminal With These Command Line Browsers)
|
||||
[#]: via: (https://itsfoss.com/terminal-web-browsers/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
使用命令行浏览器在 Linux 终端上网浏览
|
||||
======
|
||||
|
||||
我猜你可能是用 Firefox 或基于 Chrome 的浏览器(如 [Brave][1])来阅读这篇文章。或者,也可能是 Chrome 浏览器或 [Chromium][2]。
|
||||
|
||||
换句话说,你正在利用基于 GUI 的方式浏览网页。然而,在以前,人们使用终端来获取资源和浏览网页,因为所有的东西大多是基于文本的信息。
|
||||
|
||||
虽然现在不能从终端上获取每一个信息,但对于一些文本信息,还是可以尝试使用命令行浏览器,从 Linux 终端上打开网页。
|
||||
|
||||
不仅如此,如果你访问的是远程服务器,或者只有一个没有 GUI 的终端,终端网页浏览器也可以证明它是有用的。
|
||||
|
||||
因此,在本文中,我将介绍一些基于终端的网络浏览器,你可以在 Linux 上尝试它们。
|
||||
|
||||
### Linux 用户的最佳终端 Web 浏览器
|
||||
|
||||
注:榜单排名不分先后。
|
||||
|
||||
#### 1、W3M
|
||||
|
||||
![][3]
|
||||
|
||||
`w3m` 是一个流行的基于文本的开源终端 Web 浏览器。尽管最初的项目已经不再活跃,但它的一个活跃版本正由另一个开发者 Tatsuya Kinoshita 维护。
|
||||
|
||||
`w3m` 相当简单,支持 SSL 连接、彩色,也支持内嵌图片。当然,根据你试图访问的资源,你那边的情况可能会有所不同。根据我的简单测试,它似乎无法加载 [DuckDuckGo][4],但我可以[在终端中使用 Google][5]就可以了。
|
||||
|
||||
安装后,你可以简单的在终端中输入 `w3m` 以得到帮助。如果你感兴趣的话,也可以到 [GitHub][6] 上去查看它的仓库。
|
||||
|
||||
**如何安装和使用 w3m?**
|
||||
|
||||
`w3m` 在任何基于 Debian 的 Linux 发行版的默认仓库中都是可用的。如果你有一个基于 Arch 的发行版,如果没有直接可用的软件包,你可能需要查看一下 [AUR][7]。
|
||||
|
||||
对于 Ubuntu,你可以通过键入以下内容来安装它:
|
||||
|
||||
```
|
||||
sudo apt install w3m w3m-img
|
||||
```
|
||||
|
||||
在这里,我们将 w3m 包和图片扩展一起安装,以支持内嵌图片。接下来,要开始安装,你只需要按照下面的命令进行操作即可:
|
||||
|
||||
```
|
||||
w3m xyz.com
|
||||
```
|
||||
|
||||
当然,你需要将 `xyz.com` 替换成任何你想浏览/测试的网站。最后,你应该知道,你可以使用键盘上的方向键来导航,当你想采取一个动作时,按回车键。
|
||||
|
||||
要退出,你可以按 `SHIFT+Q`,返回上一页是 `SHIFT+B`。其他快捷键包括 `SHIFT+T` 打开新标签页和 `SHIFT+U` 打开新的 URL。
|
||||
|
||||
你可以通过访问它的手册页面来了解更多信息。
|
||||
|
||||
#### 2、Lynx
|
||||
|
||||
![][8]
|
||||
|
||||
Lynx 是又一个开源的命令行浏览器,你可以试试。幸运的是,很多的网站在使用 Lynx 时往往能正常工作,所以我说它在这方面肯定更好。我能够加载 DuckDuckGo,并使其工作。
|
||||
|
||||
除此之外,我还注意到它可以让你在访问各种网络资源时接受或拒绝 cookie。你也可以将它设置为总是接受或拒绝。所以,这是件好事。
|
||||
|
||||
另一方面,在终端上使用时,窗口不能很好地调整大小。我还没有寻找到任何解决方法,所以如果你正在尝试这个,你可能会想要这样做。不管是哪种情况,它都很好用,当你在终端启动它时,你会得到所有键盘快捷键的说明。
|
||||
|
||||
请注意,它与系统终端主题不匹配,所以无论你的终端看起来如何,它都会看起来不同。
|
||||
|
||||
**如何安装 Lynx?**
|
||||
|
||||
与 w3m 不同的是,如果你有兴趣尝试的话,确实可以找到一些 Win32 上的安装程序。但是,在 Linux 上,它在大多数的默认仓库中都是可用的。
|
||||
|
||||
对于 Ubuntu 来说,你只需要输入:
|
||||
|
||||
```
|
||||
sudo apt install lynx
|
||||
```
|
||||
|
||||
要想使用,你只需要按照下面的命令进行操作:
|
||||
|
||||
```
|
||||
lynx examplewebsite.com
|
||||
```
|
||||
|
||||
在这里,你只需要将示例网站替换成你想要访问的资源即可。
|
||||
|
||||
如果你想找其他 Linux 发行版的软件包,可以查看他们的[官网资源][9]。
|
||||
|
||||
#### 3、Links2
|
||||
|
||||
![][10]
|
||||
|
||||
Links2 是一款有趣的基于文本的浏览器,你可以在你的终端上轻松使用,用户体验良好。它给你提供了一个很好的界面,你启动它后,只要输入网址就可以了
|
||||
|
||||
![][11]
|
||||
|
||||
值得注意的是,主题将取决于你的终端设置,我设置为“黑绿色”主题,因此你看到的就是这个。当你以命令行浏览器的方式启动它后,你只需要按任意键就会出现 URL 提示,或者按 `Q` 键退出。它足够好用,可以渲染大多数网站的文字。
|
||||
|
||||
与 Lynx 不同的是,你没有接受或拒绝 cookie 的功能。除此之外,它似乎工作的还不错。
|
||||
|
||||
**如何安装 Links2?**
|
||||
|
||||
正如你所期望的,你会发现它在大多数默认的资源库中都有。对于 Ubuntu,你可以在终端输入以下命令来安装它:
|
||||
|
||||
```
|
||||
sudo apt install links2
|
||||
```
|
||||
|
||||
如果你想在其他 Linux 发行版上安装它,你可以参考它的[官方网站][12]获取软件包或文档。
|
||||
|
||||
#### 4、eLinks
|
||||
|
||||
![][13]
|
||||
|
||||
eLinks 类似于 Links2,但它已经不再维护了。你仍然可以在各种发行版的默认仓库中找到它,因此,我把它保留在这个列表中。
|
||||
|
||||
它不会与你的系统终端主题相融合。所以,如果你需要的话,作为一个没有“黑暗”模式的文本型浏览器,这可能不是一个漂亮的体验。
|
||||
|
||||
**如何安装 eLinks?**
|
||||
|
||||
在 Ubuntu 上,安装它很容易。你只需要在终端中输入以下内容:
|
||||
|
||||
```
|
||||
sudo apt install elinks
|
||||
```
|
||||
|
||||
对于其他 Linux 发行版,你应该可以在标准软件库中找到它。但是,如果你在软件库中找不到它,你可以参考[官方安装说明][14]。
|
||||
|
||||
### 总结
|
||||
|
||||
在终端上运行的基于文本的 Web 浏览器并不多,这并不奇怪。一些项目,如 [Browsh][15],试图呈现一个现代的 Linux 命令行浏览器,但在我这里它不能工作。
|
||||
|
||||
虽然像 `curl` 和 `wget` 这样的工具允许你[从 Linux 命令行下载文件][16],但这些基于终端的 Web 浏览器提供了额外的功能。
|
||||
|
||||
除了命令行浏览器之外,如果你想在终端上玩玩,也可以尝试一些[Linux 命令行游戏][17]。
|
||||
|
||||
对于 Linux 终端上的文本型 Web 浏览器,你有什么看法?欢迎在下面的评论中告诉我你的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/terminal-web-browsers/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/brave-web-browser/
|
||||
[2]: https://itsfoss.com/install-chromium-ubuntu/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/w3m-google.jpg?resize=800%2C463&ssl=1
|
||||
[4]: https://duckduckgo.com/
|
||||
[5]: https://itsfoss.com/review-googler-linux/
|
||||
[6]: https://github.com/tats/w3m
|
||||
[7]: https://itsfoss.com/aur-arch-linux/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/lynx-terminal.jpg?resize=800%2C497&ssl=1
|
||||
[9]: https://lynx.invisible-island.net/lynx-resources.html
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/links2-terminal.jpg?resize=800%2C472&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/links2-terminal-welcome.jpg?resize=800%2C541&ssl=1
|
||||
[12]: http://links.twibright.com/download.php
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/elinks-terminal.jpg?resize=800%2C465&ssl=1
|
||||
[14]: http://elinks.or.cz/documentation/installation.html
|
||||
[15]: https://www.brow.sh/
|
||||
[16]: https://itsfoss.com/download-files-from-linux-terminal/
|
||||
[17]: https://itsfoss.com/best-command-line-games-linux/
|
Loading…
Reference in New Issue
Block a user