Butterfly: Terminal in A Browser

Dmitri Popov

Productivity Sauce

Mar 27, 2014 GMT
Dmitri Popov

A terminal and a browser are the most important tools of any Linux user. And Butterfly allows you to combine both. This clever solution lets you use a browser as a terminal, so you don't have to constantly switch between the browser and the terminal. Butterfly is written in Python, and the utility can be deployed in a matter of minutes. Run the pip install butterfly command as root (to use pip, you need to install the python-pip package first). Launch the server using the butterfly.server.py command, and you can then access the terminal by pointing your browser to If you want to log in to the shell as a different user, you can do so by appending its name to the URL. For example, to log in as root, use the following URL: You can also allow other users to connect to the terminal on the machine running Butterfly by starting the server with the --host parameter as follows: butterfly.server.py --host="". Keep in mind, though, that this approach is not secure.

Butterfly has another clever trick up its sleeve: quick history text selection. Using the Ctrl+Shift+Up Arrow keyboard shortcut you can switch to the selection mode and then use the Ctrl+Shift+Up Arrow and Ctrl+Shift+Down Arrow shortcuts to select the text you want. Press Enter to paste the selected text to the prompt.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More