Команды браузера в linux

9 Command Line Tools for Browsing Websites and Downloading Files in Linux

In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of responses to cover few other tools of the same genre, if you’ve missed the first part you can go through it.

This article aims to make you aware of several other Linux command Line browsing and downloading applications, which will help you browse and download files within the Linux shell.

Links is an open-source web browser written in C programming Language. It is available for all major platforms viz., Linux, Windows, OS X, and OS/2.

This browser is text-based as well as graphical. The text-based links web browser is shipped by most of the standard Linux distributions by default. If links not installed in your system by default you may install it from the repo. Elinks is a fork of links.

$ sudo apt install links (on Debian, Ubuntu, & Mint) $ sudo dnf install links (on Fedora, CentOS & RHEL) $ sudo pacman -S links (on Arch and Manjaro) $ sudo zypper install links (on OpenSuse)

After installing links, you can browse any websites within the terminal as shown below in the screencast.

Use UP and DOWN arrow keys to navigate. The right arrow Key on a link will redirect you to that link and the Left arrow key will bring you back to the last page. To QUIT press q.

Here is how it seems to access Tecmint using the links tool.

If you are interested in installing the GUI of links, you may need to download the latest source tarball (i.e. version 2.22) from http://links.twibright.com/download/.

Alternatively, you may use the following wget command to download and install as suggested below.

$ wget http://links.twibright.com/download/links-2.22.tar.gz $ tar -xvf links-2.22.tar.gz $ cd links-2.22 $ ./configure --enable-graphics $ make $ sudo make install

Note: You need to install packages (libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler and make), if not already installed to successfully compile the package.

2. links2

Links2 is a graphical web browser version of Twibright Labs Links web browser. This browser has support for mouse and clicks. Designed especially for speed without any CSS support, fairly good HTML and JavaScript support with limitations.

Читайте также:  Установка vscode на linux mint

To install links2 on Linux.

$ sudo apt install links2 (on Debian, Ubuntu, & Mint) $ sudo dnf install links2 (on Fedora, CentOS & RHEL) $ sudo pacman -S links2 (on Arch and Manjaro) $ sudo zypper install links2 (on OpenSuse)

To start links2 in command-line or graphical mode, you need to use the -g an option that displays the images.

$ links2 tecmint.com OR $ links2 -g tecmint.com

links2 in commandline modelinks2 in graphical mode

3. lynx

A text-based web browser released under GNU GPLv2 license and written in ISO C. lynx is a highly configurable web browser and Savior for many sysadmins. It has the reputation of being the oldest web browser that is being used and still actively developed.

To install lynx on Linux.

$ sudo apt install lynx (on Debian, Ubuntu, & Mint) $ sudo dnf install lynx (on Fedora, CentOS & RHEL) $ sudo pacman -S lynx (on Arch and Manjaro) $ sudo zypper install lynx (on OpenSuse)

After installing lynx, type the following command to browse the website as shown below in the screencast.

If you are interested in knowing a bit more about links and lynx web browser, you may like to visit the below link:

4. youtube-dl

youtube-dl is a platform-independent application that can be used to download videos from youtube and a few other sites. Written primarily in python and released under GNU GPL License, the application works out of the box. (Since youtube doesn’t allow you to download videos, it may be illegal to use it. Check the laws before you start using this.)

To install youtube-dl in Linux.

$ sudo apt install youtube-dl (on Debian, Ubuntu, & Mint) $ sudo dnf install youtube-dl (on Fedora, CentOS & RHEL) $ sudo pacman -S youtube-dl (on Arch and Manjaro) $ sudo zypper install youtube-dl (on OpenSuse)

After installing, try to download files from the Youtube site, as shown in the below screencast.

$ youtube-dl https://www.youtube.com/watch?v=ql4SEy_4xws

If you are interested in knowing more about youtube-dl you may like to visit the below link:

5. fetch

fetch is a command-line utility for a Unix-like operating system that is used for URL retrieval. It supports a lot of options like fetching ipv4 only address, ipv6 only address, no redirect, exit after successful file retrieval request, retry, etc.

Fetch can be Downloaded and installed from the link below

Читайте также:  Установка linux тонкие клиенты

But before you compile and run it, you should install HTTP Fetcher. Download HTTP Fetcher from the link below.

6. Axel

Axel is a command-line-based download accelerator for Linux. Axel makes it possible to download a file at a much faster speed through a single connection request for multiple copies of files in small chunks through multiple http and FTP connections.

To install Axel in Linux.

$ sudo apt install axel (on Debian, Ubuntu, & Mint) $ sudo dnf install axel (on Fedora, CentOS & RHEL) $ sudo pacman -S axel (on Arch and Manjaro) $ sudo zypper install axel (on OpenSuse)

After axel installed, you may use the following command to download any given file, as shown in the screencast.

$ axel https://releases.ubuntu.com/20.04.2.0/ubuntu-20.04.2.0-desktop-amd64.iso

7. aria2

aria2 is a command-line-based download utility that is lightweight and supports multi-protocol (HTTP, HTTPS, FTP, BitTorrent, and Metalink). It can use meta link files to simultaneously download ISO files from more than one server. It can serve as a Bit torrent client as well.

To install aria2 in Linux.

$ sudo apt install aria2 (on Debian, Ubuntu, & Mint) $ sudo dnf install aria2 (on Fedora, CentOS & RHEL) $ sudo pacman -S aria2 (on Arch and Manjaro) $ sudo zypper install aria2 (on OpenSuse)

Once aria2 installed, you can fire up the following command to download any given file…

$ aria2c https://releases.ubuntu.com/20.04.2.0/ubuntu-20.04.2.0-desktop-amd64.iso

If you’re interested to know more about aria2 and its switches, read the following article.

8. w3m

w3m is another open-source text-based web browser very similar to lynx, which runs on a terminal. It uses emacs-w3m an Emacs interface for w3m to browse websites within the emacs interface.

To install w3m in Linux.

$ sudo apt install w3m (on Debian, Ubuntu, & Mint) $ sudo dnf install w3m (on Fedora, CentOS & RHEL) $ sudo pacman -S w3m (on Arch and Manjaro) $ sudo zypper install w3m (on OpenSuse)

After installing w3m, fire up the following command to browse the website as shown below.

9. Browsh

Browsh is a modern text-based browser that shows anything like a modern browser does such as HTML5, CSS3, JS, video, and even WebGL. Its major role is to be run on a remote server via SSH or Mosh and browse the web pages as text from the terminal by significantly reducing bandwidth and increase browsing speed.

It means the server downloads the web pages and utilizes the minimum bandwidth of an SSH connection to show the web page results. However, standard text-based browsers lack JS and all other HTML5 support.

Читайте также:  Extending root partition linux

Browsh Web Browsing

To install Browsh on Linux, you need to download a binary package and install it using the package manager.

That’s all for now. I’ll be here again with another interesting topic you people will love to read. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread.

Источник

Есть ли способ открыть браузер с помощью терминала?

Есть ли способ открыть Chrome (или другой браузер) с помощью терминала?

Что-то вроде: $ chrome www.google.com ?

3 ответа

Если вы хотите открыть Chrome по определенному URL, просто запустите

google-chrome www.example.com 

Чтобы открыть браузер по умолчанию для определенного URL, запустите

Если вам нужно запустить Chrome и потом закрыть окно терминала, запустите

google-chrome http://www.google.com /dev/null 2>&1 & disown 

>/dev/null 2>&1 запретит вывод сообщений из браузера в окно терминала; & поставит процесс на задний план и disown удалит задание / процесс из списка заданий, предотвращая распространение на него сигнала SIGHUP.

Для этого с другим браузером просто замените google-chrome с исполняемым именем этого другого браузера.

Вы можете удивительно открыть Google Chrome из терминала, запустив

Вы также можете запустить Firefox, запустив

И вы можете добавить URL в качестве параметра, чтобы открыть его тоже.

sensible-browser кажется, вариант, который вы ищете. Это запустит веб-браузер, установленный по умолчанию в вашей системе, вы также можете передать в него параметры, чтобы запустить веб-браузер и открыть указанные веб-сайты.

Использование:

В терминале бросьте следующий и нажмите Return

Передача параметров:

Следующая команда откроет http://youtube.com/ в вашем любимом веб-браузере:

sensible-browser youtube.com 

Как установить мой любимый вид браузера в терминале?

Просто поместите следующую команду в терминал, нажмите Return и выберите мудро:

sudo update-alternatives --config x-www-browser 

В следующем примере я выбираю luakit как мой браузер по умолчанию. Вы можете изменить веб-браузер по умолчанию столько раз, сколько пожелаете.

[email protected]:~$ sudo update-alternatives --config x-www-browser There are 5 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/google-chrome-stable 200 auto mode 1 /usr/bin/firefox 40 manual mode 2 /usr/bin/google-chrome-stable 200 manual mode 3 /usr/bin/konqueror 30 manual mode 4 /usr/bin/luakit 10 manual mode 5 /usr/bin/xlinks2 69 manual mode Press enter to keep the current choice[*], or type selection number: 4 update-alternatives: using /usr/bin/luakit to provide /usr/bin/x-www-browser (x-www-browser) in manual mode 

Отсоединение от терминала

Если вы хотите, чтобы ваш веб-браузер работал сразу после закрытия терминала, просто добавьте символ амперсанда в конце команды:

sensible-browser [parameters] & 

Источник

Оцените статью
Adblock
detector