How to get a bash shell on Windows 7 & 8


Windows 10 has a built-in bash shell. I use Windows 7 and 8.1 so I was dead jealous. But I’m also an inveterate  googler, so I googled “bash windows” and found two different ways to run a bash shell on the versions of  Windows that I use: git-bash and MSYS2.

Git-bash is part of Git for Windows (“We bring the awesome Git SCM to  Windows”); MSYS2 is “a software distro and building platform for Windows” based  on Cygwin but because it is just providing a CLI (no X-server, no GUI) it is fast enough and not so buggy. Both use the MinGW  terminal, and both provide a pretty full bash environment. They were made so developers can work on Windows apps but retain the *nix-like environment.


git-bash MINGW64 terminal

MSYS2 uses the pacman package manager, and has software repos so users can install extra packages (eg  openssh). Git-bash doesn’t provide extra installation as such: but as it runs Windows .exe apps, it is  possible to install .exes and, by placing them strategically you can run them in the terminal window – I  have so far been able to install nmap and wget to run on the command line. To get wget on git-bash, I  downloaded the standalone wget executable and placed it on the $PATH. To get nmap to work, I edited $PATH  so it included /c/Program Files (x86)/Nmap.


The MSYS2 terminal

I haven’t decided which one I prefer – I’m currently running them side-by-side. One bugbear with git-bash  is that to run python the user has to prefix it with “winpty”. Winpty is “a Windows software package providing an interface similar to a  Unix pty-Master for communicating with Windows console programs”. Interestingly it is described as a tool  for Cygwin and MSYS2, but it is not needed for MSYS2 to run python; just git-bash (well, for python anyway – maybe I just haven’t yet come across a need for it in MSYS2).

Has anyone else here tried these? Any other ways to run a *nix shell on Windows?  Let us know what you think!


Linux Outlaws is poorly


If you look at my blog side-bar, you’ll see I like the podcast Linux Outlaws. But they’re not recording regularly at the moment (one of the presenters, Fab, has lost his job and for some reason that gives him less time to devote to the show. Does that make sense?).

Anyway, Linux Outlaws ain’t doing too well. If anyone knows of another decent Linux-based podcast, let me know through Comments. I like Linux. And so should you!

EDIT: Fans of Linux Outlaws probably already know, but I’m going to mention it here anyway, just in case a reader doesn’t yet know – Linux Outlaws are back, and had posted a couple of episodes before I noticed!  Fab and Dan are seriously devoted: they upload an episode at least once a week, sometimes more than once.  Yet they sound so laid-back and casual, it’s hard to relate this to everything Fab especially has gone through recently.  I hope he resolves all his problems soon.  Actually, it’d be pretty cool if he got another job posted in Britain.  I’ve never gone to a Linux outlaws-related event, nor an OGGCAMP but when he was living in London there was more chance of meeting him IRL.  He’s a fun character, outrageous and abrasive, which I approve.  If you haven’t listened to Linux Outlaws yet, you really ought to check it out – hit this link NOW!!


Locations of visitors to this page

free web stat

Linux Outlaws blog up (again)


Linux Outlaws, my favourite Free software-related podcast, has relaunched its blog, mainly so listeners to podcasts will be able to find out what’s what, when, where, why…  As Fab posts:

All important, official announcements from Sixgun Productions will get a post on this very blog from now on. These are things that most likely also benefit from a more wordy post than a 140 character Twitter message. Links to these posts will, of course, be shared on the above mentioned Twitter and Google+ accounts. Aside from important messages like that, there probably will not be a lot of other content on the blog at this time. Dan and myself are both pretty busy at the moment and the fact that I am writing all day in my day job usually means that when I am coming home at night the last thing I want to do is sit down at a keyboard to type more than 140 character blurbs. That being said, I’ll try to give you behind the scenes impressions and some other (hopefully) interesting tidbits where I can.

So if you want to keep up with podcasts (Linux Outlaws and Angels of Death right now, but you never know what the Sixgunners are gonna do next), check out – it’s already on my blogroll!

Locations of visitors to this page

free web stat

Ubuntu 10.04.1 “Lucid Lynx”: First impressions


Wednesday, 18 September 2010

Well, yesterday I finally got round to downloading a Lucid .iso. It was 10.04.1 actually, so the .iso has been updates. That means I won’t have to download too many updates if/when I get round to actually installing Lucid on my home desktop (currently running Hardy – I love LTS!). I hate it when I install an OS and then have to download shitloads of updates.

Anyway, I used UNetBootin to put the .iso on a usb stick, and my desktop is currently running a live session of Lucid. I haven’t been using it on there for very long at all. Later, when I’ve used the live usb for a few days, I’ll post a review. But for now, here are my first impression.

Start-up time wasn’t too bad; i didn’t time it, but it seemed quick enough. And it seems to be pretty quick even when running from RAM. I opened a file in the OOo word-processor, and it came up a lot quicker than an older version may have done.

I’ve seen a lot of users’ comments about the colour scheme. Let me add to the pot. I think it looks okay. It’s the kind of scheme I might have used in the past to replace that dreaded “human” theme. I tend to prefer blue to purple, but in no way do I dislike purple. Let’s see how I feel in a couple of days.

The Window buttons moved to the upper left corner: I don’t know about this at all. I may get used to it, but at the moment I feel it very counter-intuitive. We’ll have to wait and see.

It detected my screen resolution automatically; but that doesn’t necessarily mean it’ll be okay when the OS has been installed. It’s happened to me in the past, where a live cd has given the correct display resolution, but once the OS has been installed the resolution drops to some ridiculous level like 640 x 480 and I’ve had to fix it. Not that fixing stuff is always a problem. But the less fixing needed the better, I think.

I have a lot of audio files in .ogg format so it was easy to see that it sounded okay. But I don’t have any .ogv video files, and the sole .ogv file in the Examples directory didn’t really show what output might be like.

I think that’s about all I can say right now. Over the next few days I’m going to use the Lucid live usb as much as possible, on my EeePC netbook as well as the home machine. So keep an eye out for the follow-up to this post, if you’re interested in the latest Ubuntu Long Term Support version.

I <3 Dropbox!


Well, maybe it’s a bit overboard saying that I “heart” Dropbox. I mean it’s just an online storage solution, it hasn’t got breasts or a dazzling personality! But I think it’s pretty cool nevertheless, and today I’m gonna tell you why.

For quite some time now, barely a day has gone by without me seeing or hearing something about “cloud computing”. And although I hate these buzz words that don’t actually mean very much, I finally figured that “the cloud” was something I could use.

I need to access some files an awful lot, wherever I may be. And sometimes that means accessing the files from a library computer, or a computer at a client’s office – in other words, computers that do not belong to me. And even if I do have my netbook on me, I want any alterations made to my files to be synchronized to all my machines automatically.

For reasons too boring to go into here, I can’t access my home machine from the internet. And I am remarkably ill-equipped when it comes to online resources – I use a blog for crying out loud, I ain’t got a web server of my own kicking around somewhere. And carrying a fistful of USB sticks is not an ideal solution – sticks can easily be misplaced or even stolen. So I decided I needed to sign up for one of those “cloud computing” services, where I put a bunch of files on a third party’s server somewhere out there on the interwebs which I can then access no matter where I am (within reason – if I’m on a camel in the middle of the Sahara and forgot to pack my satellite phone I’d be screwed. But as I own neither a camel or a satellite phone, I think we can rule out that possibility).

Because of my innate stingeyness, I needed a solution that was free. So I fired up my good friend Google, plugged in the search terms “free cloud computing storage” and let ‘er rip. And it turned up a few free solutions, such as, Google’s various products,,… There’s a lot out there – if you want a quick list of freebies check out this guide at

But of course, I’m utterly clueless when it comes to all this cloudy Web 2.0 stuff. So I went to my favourite forum and had a look at what folk there were saying on the subject.

Unsurprisingly for an Ubuntu site, a lot of people seemed to rate Ubuntu One. But there were also a bunch who liked DropBox. And I kinda liked what they were saying. So I chose to go with DropBox.

Like a lot of these cloud storage services, DropBox gives you 2GB of space for free. You install this program on the computers you want to be synced (and yes it comes in a linux flavour), create a DropBox folder on each computer, then link those computers to your account. Once that’s done, all you have to do is put files into the DropBox folder on one of the computers, and before you know it those files are accessible from all your synced computers. And you can even access them if you’re on a different computer, as there’s a web interface you can sign into from anywhere!

Another cool feature is the “Public” sub-folder. If you put a file into the Public sub-folder, then right-click on it, you get a link to that file that you can post in a blog, forum, whatever. So you can make chosen files accessible for absolutely anyone you want, without having to tell them your username or password. For instance, here’s a link that will enable you to download a pdf of the novel Neuromancer by William Gibson. If you’ve never read it, I strongly urge you to give it a go. Extremely cool cyberpunk science fiction. And I’ll let you have have it for the very reasonable price of fuck-all.

Cloud computing isn’t for everyone, despite what some characters will try and tell you. A lot of people will have no need for it whatsoever. But if you think it might be useful, go grab yourself a free account and give it a whirl. I’ve certainly been seduced by the sultry maiden called DropBox, as you may have guessed from this gushing love letter. Did I say love letter? That should have said “porn”. Cos DropBox makes me horny as only a sad geek can be!!

Note: Unfortunately, some of the info here is out of date. For instance, no longer provides a free service (though they’ll happily take your money) and for some reason the site seems to be unavailable. But there definitely are free services available out there. Go check it out!
I just thought I’d add a footnote to point out there’s another free (as in beer) online storage solution out there: Gspace. This Firefox add-on enables you to use the inbox of a Gmail account as an online disk. Google gives its Gmail users an awful lot of storage – more than 2GB at the moment, and rising all the time – plus you can use any number of Gmail accounts with Gspace. This solution is especially useful if, like me, you own a netbook with limited onboard storage. It works with Windows, OSX and Linux. I use Gspace, and can thoroughly recommend it.

_got=2;_goi=2;_goz=0;_gol=’Free hit counter’;_GoStatsRun();
Free hit counter
Free hit counter

How to speed up dpkg on Ubuntu


I found this wonderful little tutorial at Some members have reported significant speed increase for dpkg -i. Thanks to forum member Peter Cordes who wrote it up. Please send all kudos to him, he’s the one who deserves it. Brickbats too.

dpkg -i and dpkg -S are slow when the FS cache is cold. Most of the time is spent reading ~2400 .list files from /var/lib/dpkg/info. It reads them in the order they’re listed in the status file, I suppose. Anyway, _not_ in alphabetical (info/*) or readdir (ls -f info) order.

Most filesystems allocate space in the same area of the disk for a set of files all written at the same time. So cp -a info would generate a defragged copy of the directory. (not that any individual files in it were fragmented, they’re tiny, many smaller than the FS block size. ls -lhrS *.list | less, and type 50% for example, to see the median file size (~600B), or 90% to see the 90th percentile size (7kB).

But this doesn’t actually help, because the disk ends up having to seek back and forth because the files aren’t read in the same order they’re stored on disk. It doesn’t help much that the files are closer together. Maybe 18sec vs. 24sec, IIRC.

Here’s what I did:

strace -efile -o dpkg -S /bin/ls
cd /var/lib/dpkg
grep ‘^open’ ~/ | sed -r ‘/dpkg\/info/sX.*”(.*)”.*X\1Xp’ -n | xargs sudo cp -a -t
# cmd line length limits prevent info/*. I could have used rsync -au info/
sudo cp -iau info/[a-k]*
sudo cp -iau info/[l]*
sudo cp -iau info/[m-z]*
diff -ur info
sudo rm -rf info
sudo mv info

echo 3 | sudo tee /proc/sys/vm/drop_caches
time dpkg -S /bin/ls


peter@tesla:~$ time dpkg -S /bin/ls
coreutils: /bin/ls

real 0m2.877s
user 0m0.264s
sys 0m0.168s

peter@tesla:~$ ll -d /var/lib/dpkg/info
drwxr-xr-x 2 root root 76K 2008-12-07 06:36 /var/lib/dpkg/info

Now dpkg -S (and presumably dpkg -i, too) takes
2.8s elapsed time. (Root FS = 1.5GB JFS, on a degraded RAID1 (md), at the beginning of a WD5000YS (RE2) supporting NCQ with depth 31, AMD64 Linux 2.6.28-2-generic (Intrepid user-space, Jaunty kernel), Core 2 Duo E6600 (2.4GHz), 4GB DDR2-800. But mainly it’s the HD and the FS that matter here)

I wonder how long this performance will last, as packages are upgraded. At least it doesn’t matter if readdir order changes as files are removed and added (since the file’s reading order doesn’t depend on that), but it does matter if the status file’s order changes. Since the files won’t reposition on disk, it’s only fast as long as they’re read in (mostly) the order they were written.

The directory itself can start to fragment, since it’s 76k = many filesystem blocks. XFS gets directory fragmentation fairly easily. (I use XFS for everything else, and it’s fast with a couple tweaks. e.g. -o logbsize=256k, and enabling lazy-count=1 with xfs_admin or at mkfs time.)

_got=2;_goi=2;_goz=0;_gol=’Free hit counter’;_GoStatsRun();
Free hit counter
Free hit counter

No wvdial in Ubuntu!


If you are an Ubuntero and use dial-up to connect to the internet or use a cellphone as a modem, you may have noticed that the “intelligent dialer” utility wvdial is no longer included on the Ubuntu live CD. This has been the case since 9.04 (Jaunty) and is still true with Karmic (9.10) – and I’ve been told it won’t be on the 10.04 (Lucid) CD either!

Well, us wvdial-using Ubunteros need to stick together! It can be very difficult to configure ppp; in comparison wvdial is a cake-walk. Lots of dial-up users like to use Gnome-PPP to manage their internet connection, but the absence of wvdial just makes it hellish to get hold of any such tools. We need wvdial! Right?

Well there is something we can do about it. There is a bug report on Launchpad which asks the developers to include wvdial in future versions of Ubuntu. I am asking everyone to create an account on Launchpad then go add their name to that bug report – ie click on this link and add a comment echoing the request for wvdial. I’m not sure, but I think the developers must have decided that dial-up doesn’t exist anymore… or that dial-up users don’t matter. We need to tell them they’re wrong. Really I can’t see any good reason for excluding wvdial: it’s a pretty small binary, so I don’t think the devs needed the disk space for something else! And the fact it’s such a small program means there is no reason not to put it back in. The devs just need to be told there is a demand for it. That’s where you come in.

Please please add your name to the Launchpad bug report. Even if you don’t use wvdial yourself, please help the rest of us. A lot of us can connect to the internet only by using dial-up; I’ve seen posts on where users have said they will actually have to switch to another Linux distro if this isn’t put right! So please… tell the Ubuntu developers to give us wvdial!!

_got=2;_goi=2;_goz=0;_gol=’Free hit counter’;_GoStatsRun();
Free hit counter
Free hit counter

%d bloggers like this: