WP-Terminal is a WordPress Plugin that provides a terminal-like box for embedding terminal commands within pages or posts.
Here, you can see a live demo of the plugin:
mariano@computer:$ ls -a
user@vera:$ ls -a
mariano@vera:$ ls -a
user@computer:$ ls -a
user@computer:$ ls
. ..
ls -a
. .. .hiden_file
. ..
ls -a
. .. .hiden_file
Take a look to the WordPress page of the plugin to see the basic syntax and download links
This plugin is just a customization of Ryan McGeary’s WP-Syntax, and the css is an idea taken from a nice blog: Casidiablo
Blogs using WP-Terminal:
- 0Pointer (of course!)
- LePingouin (starting here)
- iGhost (starting here: Love UNIX)
- Empulse Group
- eXPe
- Mostly Harmless (starting here: Terminal Syntax highligher plugin)
- Experiences and adventures in the Cisco and Linux world…(starting here)
- Superubuntu
- The Sh17
- El blog de Ernesto Carrión
- Digit Oktavianto Web Log
- Seqizz
- ubuntovod by Sk8er
If you want to be added to this page, just leave a comment and provide your URL

FDV
Hola!, he visto por ahi que hablas español, espero que asi sea
, el plugin esta excelentisimo!!, gracias por ese gran aporte!
Hi I’ve been looking for something like this nice plugin for some time being a *nix geek it’s wonderful to have the terminal icon displayed for commands/code snippets so if you want feel free to add my blot to the list of sites using your plugin
Thanks, Lethe.
Excellent plug in! Thank you very much for making it!
I have a feature request. Could you make the default username and computer globally configurable in a settings section on the WordPress configuration, so that I don’t have to put them everywhere except where I want a different one and still have a nice username and computer on my web site.
Hi Pablo! Glad you liked it.
Even it’s in my plans to add a config page, I don’t know when I’ll be able to do it. In the meanwhile, you can edit wp-terminal.php and modify the defaults in lines 85 and 87 as a workaround
The documentation says that we should add an id=”terminal” to each pre, but ids should be unique so you either end up with only one terminal per post, or with broken HTML. It should be class, not id, for the argument.
@J. Pablo Fernández
Nevermind, disregard that comment.
Add change prompt from user root:
if ($user == ‘root’) {
$prompt = $user.”@”.$computer.”:# “;
} else {
$prompt = $user.”@”.$computer.”:$ “;
}
Hello again,
I made some more changes to its plugin and packaged it in http://rra.etc.br/linux/wp/wp-terminal.0.3.zip
The changes were:
- Added the option “color” to color the prompt (like gentoo-linux prompt). The possible values are “true/false”, with the default “false”;
- Now the plugin replaces the occurrence of the key [prompt] for the $prompt;
- Put the $prompt string in bold to highlight.
- Remove blank lines from the beginning and end of
but not put blank lines at the beginning or end of the block of commands.
These changes were made by my friend Almir Mendes (m3nd3s@gmail.com) and other minor changes by me (rudsonalves@rra.etc.br).
@rudson
I’ve been using wp-terminal for a while, but I just replaced the wp-terminal.php from rudson’s modifications and the [prompt] replacement was one of the things I really wanted in the plugin
the ‘color’ option needs some work though. I might add some updates of my own to this plugin soon
I have started to use it on my blog to, Nice Work.
nice plugin! good for Linuxers.
Thanks for this post, I was looking for information like this.
Thanks for a plugin !
I really enjoyed it, I was look to fond this king of plugin. Even though there is no config page, I find it very usefull
Glad you liked it
Not having a config page is kind of a feature… you can freely modify the code to your needs
Hai bro, i just tested your plugin with the newest wordpress version. It works.
just give a rating in wordpress.org. And now, i will use your plugin in my blog. Thanks a lot
Hi, i’m using with one wish. How can I not show the prompt, the user@computer part? I want to use that for also the </code tag
I’m sorry, but you can’t, right now. It doesn’t have the feature you want yet (feel free to fork the project and add it)
Really cool, thanks!
Since I’m lazy, I’ve taken the css code and changed a few bits to my theme. Now I can use the ‘quote’ button in the wysiwyg editor and get the same effect, without having to think about the variables.
With basic knowledge of css it should be quite easy to change the blockquote style used by your theme. Mine looks like this now:
.entry blockquote {
color:#FFF;
background-color:#444;
background-image:url(‘images/terminal.png’);
border-top:1px solid #AAA;
border-bottom:1px solid #AAA;
font-family: ‘Courier New’, Courier, Fixed;
background-position:15px 10px;
background-repeat:no-repeat;
margin-bottom:10px;
margin-left:0;
margin-top:10px;
text-align:left;
padding:5px 10px 0px 40px
}
.entry blockquote p { font-style: normal }
.entry blockquote p:before { content: ‘user:$ ‘; font-style: italic; }
The “p:before” puts some text before each line (in my case “user:$”).
Nice idea!!! Thanks a lot for sharing. I’ll see if I can improve the plugin including this.
I use your plugin here: http://ubuntovod.ru/