1. I don't feel comfortable working on Linux;2. I need to develop software for Linux.

Some background: I have 10+ years of programming experience on Windows (almost exclusively C/C++, but some .NET as well), I was a user of FreeBSD at home for about 3 years or so (then had to go back to Windows), and I've never had much luck with Linux. And now I have to develop software for Linux. I need a plan.

On Windows, you can get away with just knowing a programming language, an API you're coding against, your IDE (VisualStudio) and some very basic tools for troubleshooting (Depends, ProcessExplorer, DebugView, WinDbg). Everything else comes naturally.

On Linux, it's a very different story. How the hell would I know what DLL (sorry, Shared Object) would load, if I link to it from Firefox plugin? What's the Linux equivalent of inserting __asm int 3/DebugBreak() in the source and running the program, and then letting the OS call a debugger? Why do release builds use something, called appLoader, while debug builds work somehow different? Worst of all: How to provision Linux development environment?

So, taking into account that my hatred might be associated with not knowing enough, what would you recommend? I'm ok with Emacs and GCC. I need to educate myself as a Linux admin/user, and I need to learn proper troubleshooting tools (strace is cool, btw), equivalents to the ones I mentioned above.

The book Advanced Unix Programming by Marc Rochkind is a must-read, IMHO. It offers lots of examples and covers all POSIX/SUS topics in a very well-explained way. It's the best book about this topic I've read so far.

But to make your life easier I actually recommend you use a highlevel API that abstracts stuff for you, like Qt. It will also make writing cross-platform a lot easier.

Doing Linux From Scratch helps you get an understanding of how a Linux system is composed, but I think it doesn't much improve your knowledge about it from a developer's point of view. It does, however, make you more comfortable with Linux, as you learn what parts are there in a Linux environment (and also why). A Linux won't be a big blackbox to you after working through Linux From Scratch.

3) Start slowly. If there is an immediate problem to solve, get the code compiling (or start writing from scratch). Like you would tackle any development project, get the stuff you know working first (i.e. things that don't need OS specific interaction), and then when you hit a snag—search. I'm sure someone out there has come across the same problem before and resolved it.

Most importantly, leave all your preconceived notions at the door. And no, you don't need to be a guru to develop in Linux, I know enough to get around, but not everything—and I'm comfortable with that...

Answer: An Ode to Linux (6 Votes)

The Mac OS X is like a Mercedes; it's the prettiest and cleanest but it costs a lot. Windows is like a Toyota; it will get you there and back.

Linux is like a hot rod; It's for people to dig into and take apart and put back together again. Linux is not for someone who just wants to use the computer; it's for people who love computers. People who don't love computers should stay away from it.

The stuff you learned in Windows won't translate very well, no. But you get to see the internals and watch the engine run.

Try to take Linux as a new toy, that you can play with and crawl into and see what's going on. Things that are easy in Windows are harder in Linux; things that are impossible in Windows are possible in Linux.

If you love computers you can love Linux; if you don't love computers why are you programming at all?

Honestly, if you're a windows user, get hold of a good KDE based distro. Most of the basic day-to-day doing of stuff is not going to be challengingly different. That will get the small stuff out of the way.

Frankly, if you're going to be an adept developer, learn the command line, bash is your friend. Learn the command line tool chain reasonably well, so you understand how to compile, link, debug, etc. You can always use a nice GUI editor. Something simple but with modern features like Kate will do fine (it is pretty similar to other advanced text editors like TextPad or whatnot, there's no real learning curve).

The basic concepts are really not all that different between platforms. GUI toolkits are probably the most divergent thing you'll run into, and something like QT really is not too hard to grasp for someone that has a good understanding of C++. I wouldn't even worry about things like shared libraries. You can sort that out later, get yourself up and running. Honestly unless you're building something quite complex you're not going to need to know much about Linux internals at all, libc and whatever utility libraries you need are the things that are going to mater. Same goes for stuff like strace, ltrace, etc. You'll need it once a century unless you do kernel level coding. gdb is all you'll probably ever use.

Once you've done a bit of stuff and understand your basics, then go take a look at different IDEs. There are quite a few choices, and unlike MSVS you'll probably use several tools for GUI programming on Linux, especially if you use QT, which I highly recommend. It has a learning curve all its own, but frankly it is better on windows that MS's stuff, so basically just learn it and you won't be sorry.

Several questions for the person.. You state you need to program for "linux". What distro are you programming for? Debian, Ubuntu, Red Hat Enterprise Linux (RHEL), Fedora, Suse, OpenSuse, etc etc.

The answer to several questions will depend on which of the above you are coding for. From experience with dealing with the programmers at work (disclaimer, I'm not a programmer per say) is that if you stick to C++ and GCC you can pretty much compile code on any platform.

The trick with dependencies can be a big bugger. It's fairly easy with Debian, Ubuntu, Fedora and OpenSuse. they have large repositiories that folk maintain that work against a specific version of the OS. RHEL on the other hand has lawyered up and only allows a specific set of software into their repo's that follow whatever their lawyers have decided they are to follow. You then have to use sites such as rpmfinder to get the rest of the stuff you need.

Reading that article and subsequent comments made it look so much harder than it needs to be.

If you're a Windows user and want to get your feet wet, burn a LiveDisk/LiveUSB of your preferred Linux version (aka distro). My experiences are based on Ubuntu. This allows you to have a look around and if you don't like it, just shut down the live session and you won't have to bother with uninstalling or formatting. E.g. If you don't like it, you don't lose anything.

If you like the experience, or wish to explore Linux somewhat more, find yourself an old/cheap laptop (nearly anything will do) and format it (or create a Dual Boot). Now, you can go out and explore it into more depth. My experience in IDEs in Linux are NetBeans, Eclipse and Qt Creator. I've used them mainly for C++ development (and lately some Java in Eclipse). Qt Creator was especially nice when building user interfaces, as setting up Qt was quite the chore back in the day (on every platform), although I recall using Qt in Eclipse as well.

Installing things is really straightforward through the software centre and the more advanced user will quickly discover the usefulness of "sudo apt-get install <programname>" in the commandline. But progress at your own pace, it's really not that different. It has a mouse and a keyboard, and if you managed to use a Windows or Apple device, it'll work out just fine.

Don't see it as a chore, but as another experience. The days of lines of gritty text on a boring black background are long gone (but still available if you so choose ).

Spoilers: even fewer people care about moving to BSD than do moving to Linux.

Me, I just bought a Mac.

Had to use one for some time because I had to port some applications (often pure python, so it was mostly figuring out how to package them up, but also some larger rewrites of low level platform specific stuff; they could really take notes on how to document APIs from MS and xcode really isn't as full featured as Visual Studio) and really didn't like it much. On the other hand it's nice having clang and co available with only jumping through some minor loops.

b2t: Imo the best way when learning *any* new OS: Install it and get back to your work. Every time you stumble upon something you don't know how to do, look up how it's done. One usually gets by with only a few number of essentials and learns the rest on the side over time.

I've been a DOS/Windows user since 1982, a QNX user since 1982, a Unix user since 1982-83, and a Linux user since the 1990's. I am also a professional developer, having designed and built major system software for all these systems (including a complete TCP/IP stack for the QNX real-time OS for the US DOD). Either burn/run a live CD/DVD/USB version of the distributions you are interested in (see Unetbootin on SourceForge.net), or install VirtualBox (free) and run the distributions you may be interested in within a virtual machine. Once you are comfortable with any specific distribution, backup your Windows data, and install that distribution on your hardware - bearing in mind that wireless networking (WiFi) may require the installation of specialized drivers and/or firmware - www.linuxwireless.org is an invaluable site for help with that.

This is VERY harsh towards the honorable engineers in Japan.......and it´s not even a very fitting comparison, either. Toyotas are known to just work.

I think its a very fair comparison. Windows 7 is a rock solid OS that does "just work" and is far more useful and hardware friendly than a hobbyist`s OS like Linux. I know with Windows all of my hardware always works every time unlike the constant sound issues I experience on my laptop with Linux (no headphone sound) or with my desktop that has constant sound issues with Ubuntu. I usually have to reboot 2 or 3 times to get the sound working as Linux conflicts my Bose USB sound with the HDMI sound (which I don`t use) on my video card. Of course there`s no workaround for either of these well known issues. Linux is fun to play around with, but it`s strictly amateur hour compared to Windows.

Higher level programming: Try Python or the JVM (ideally with Scala). I'd recommend IntelliJ for the IDE or a text editor and command line tools (Maven or Gradle). Particularly, if you want to write multiplatofrm software, this is ideal.

LaTeX: This is so, so much better than GUI tools like LibeOffice or Microsoft Word and PowerPoint. Tech types swear by hand coding precise elegant HTML rather than using a WYSIWYG tool that auto-generates inferior HTML, but then they use sloppy WYSIWYG for documents.

This is VERY harsh towards the honorable engineers in Japan.......and it´s not even a very fitting comparison, either. Toyotas are known to just work.

I think its a very fair comparison. Windows 7 is a rock solid OS that does "just work" and is far more useful and hardware friendly than a hobbyist`s OS like Linux. I know with Windows all of my hardware always works every time unlike the constant sound issues I experience on my laptop with Linux (no headphone sound) or with my desktop that has constant sound issues with Ubuntu. I usually have to reboot 2 or 3 times to get the sound working as Linux conflicts my Bose USB sound with the HDMI sound (which I don`t use) on my video card. Of course there`s no workaround for either of these well known issues. Linux is fun to play around with, but it`s strictly amateur hour compared to Windows.

I agree with jeffrey, I can't remember a single time that my car stopped working and to get it right back I had to

(a) stop (b) take the key off(c) put the key and turn it again(d) get back driving, without any trace or evident reason for the abnormal failure

I also don't remember a single day (I use Linux for 8+ years) that my installation failed because of lacking drivers.

On windows, even 7, should you not have all drivers previously, you might just not be able to install it at all - I had 3 HP workstations that needed the so called third party drivers at install time to get going.

Also, in case of conflicting drivers, Linux is way easier than windows to solve.. Distros like Ubuntu ship with (sometimes) unnecessary extras, but if they fail for some reason, there's still a chance of success by getting rid of unused drivers and blacklisting others. On windows everything is a mystery, even with the right/supplied drivers you can find your personal hell...

Sorry to disagree, but hardware support on Linux is, in my opinion, in a much better state

I clicked this with the intent to find some helpful tips about transitioning from windows to linux on the home box. What I got was people offering suggestions to do linux from scratch.

Even for stack exchange I am a little disappointed.

Eh, the guy was asking about doing development as his main focus, so we kinda slanted that way.

For a pure home box you're going to use for basic applications and productivity, you can grab Ubuntu, though I'm not the biggest Gnome fan. It certainly works well and is designed for that purpose. You could also try Mint. I've been using Mandriva for years, but they look like they're kind of imploding now, which is too bad, it is a great KDE based distro. OpenSUSE might be an alternative there, though you could also try Kubuntu I guess.

There's not actually a LOT to tell beyond that. Any of those distros will give you control panels for setting up the usual sorts of stuff, network, etc. and a good installer, and some sort of usable package manager (for installing software). You'll have a choice of applications for whatever you want to do. FF or Chromium for web, whatever flavor of Open Office/Libre Office is fashionable today for office stuff, etc. There's not really a HUGE difference between mainstream distributions. Setting stuff up is pretty obvious and straightforward.

Definitely give one of the 'live' (USB Stick or DVD based boot) things a spin to check it out. They all have one. Honestly Linux at this point is as mature a desktop OS as the standard Windows/OS-X, there's really not a lot of drama to it. The more difficult sorts of configuration stuff are pretty well handled by whatever 'control center' management apps any particular distro comes with. Once in a while you'll find you may want something like an NVidia proprietary driver or whatnot that you may have to go download. Very little hardware isn't well supported really.

I mean basically there's more that can be said for a specific distro in terms of quirks or solving particular problems, but not a lot more to say about general home computing. It isn't like 10 years ago where you had to delve around on the command line or hunt down and compile drivers and whatnot (and WAY not like back in the early 90's when you were installing from 20 floppies and compiling your own kernels and then trying to figure out how to get FWM95 to work after you hacked together an X config file by hand).

Answer: skip the Linux step and go directly to a Mac. That's where you'll eventually end up anyway (unless you're one of those FOSS crackpots who refuse to use any non-free software).

I did that step but in reverse. Went from Windows to trying a Mac... and hated it. I find that for some OSX just works. For others, like myself, its a total mess and crash fest. I had OSX 10.4-10.6 (I used friends macs, I didn't buy one) and I averaged a total system crash in 5 minutes on 7 Macs, just doesn't work for me. And yes trolls, I really did try a Mac, its why I tried a few different ones to make sure it wasn't a lemon. One crashing is a fluke, 7 crashing is a pattern. Even killed one Mac's wireless without meaning to. I just didn't like it in the end (best comment I did get about OSX though was "Stop using it like you want to and just start using it like Apple wants you to use it")

Not to mention, I find Macs are just plain ugly. All the effort they put into making it look "clean and polished" just comes across to me as "sterile and plasticy". That just doesn't ring with me.

After using those Macs I happily went back to Vista, as it worked for me. I then went to Linux (Ubuntu) and it works great for me. There is choice for a reason, different things work for different people. At the moment I dual-boot between Ubuntu 12.04 and Windows 7, Windows 7 is just for games, I do the rest on Ubuntu.

PS, I'm not bothering to respond to the trolls so don't bother. I really did use that many Macs, I really did have those problems, I really am telling the truth and I really don't give a crap if you feel the need to insult me and declare I must be lying and whatnot because I found that OSX wasn't perfect and god knows what else. I've mentioned this before and I've dealt with trolls before and bluntly put, I'm just tried of dealing with it. If you have a serious comment I will respond, trolls are ignored.

Answer: skip the Linux step and go directly to a Mac. That's where you'll eventually end up anyway (unless you're one of those FOSS crackpots who refuse to use any non-free software).

I'll go Linux FT before going Mac. I'm not a FOSS crackpot and have no problem paying for software.

I'm shocked people didn't bring up earlier to dig in your closet for spare PC parts and make a Linux PC to learn on from parts that are just gathering dust. I did that and was lucky enough to not run into any driver problems etc. So i'm still able to to my development and game on windows and have a second separate instance to learn on and play with.

My advice (that hasn't already been mentioned): Narrow your focus of distro first. I don't remember where I read it but the quote was "people who know fedora/RHEL know Red Hat and people who know mint and slackware know linux." It only gets more true with every distro release. For the record I love Fedora but mint and openSuse were a little more up my alley. If you're trying to develop an application for a client then you should already know what distro they are using. I think the fact that there are so many distros does put people off initially. If you need to learn Linux you just need to dive in. You can get a plethora of books on amazon for cheap and Google any problem you run into because someone probably has posted about it. The only time i've run into problem with figuring things out was using new distro's the day they came out.....all i can say about that is don't do it. OS works fine its just getting other things to install etc.

I want to see documentation, aka HCL saying it's been proven on a given distro, without having to resort to the vendor "binary blob" contortions.

FOSS is great when it works, as in video and wireless, and it sucks when it doesn't as in video and wireless.

Not much the FOSS guys can do when there is not enough hardware documentation to implement a good FOSS driver. Anyway, switching to a binary blob is easy and they're always in the main distro repository. This means less mucking around and time wasting.

This is VERY harsh towards the honorable engineers in Japan.......and it´s not even a very fitting comparison, either. Toyotas are known to just work.

I think its a very fair comparison. Windows 7 is a rock solid OS that does "just work" and is far more useful and hardware friendly than a hobbyist`s OS like Linux. I know with Windows all of my hardware always works every time unlike the constant sound issues I experience on my laptop with Linux (no headphone sound) or with my desktop that has constant sound issues with Ubuntu. I usually have to reboot 2 or 3 times to get the sound working as Linux conflicts my Bose USB sound with the HDMI sound (which I don`t use) on my video card. Of course there`s no workaround for either of these well known issues. Linux is fun to play around with, but it`s strictly amateur hour compared to Windows.

I agree with jeffrey, I can't remember a single time that my car stopped working and to get it right back I had to

(a) stop (b) take the key off(c) put the key and turn it again(d) get back driving, without any trace or evident reason for the abnormal failure

I also don't remember a single day (I use Linux for 8+ years) that my installation failed because of lacking drivers.

On windows, even 7, should you not have all drivers previously, you might just not be able to install it at all - I had 3 HP workstations that needed the so called third party drivers at install time to get going.

Also, in case of conflicting drivers, Linux is way easier than windows to solve.. Distros like Ubuntu ship with (sometimes) unnecessary extras, but if they fail for some reason, there's still a chance of success by getting rid of unused drivers and blacklisting others. On windows everything is a mystery, even with the right/supplied drivers you can find your personal hell...

Sorry to disagree, but hardware support on Linux is, in my opinion, in a much better state

What complete and utter bullshit. Linux hardware support in a much better state? You`re statement is almost laughable it`s so ass backwards.

Answer: skip the Linux step and go directly to a Mac. That's where you'll eventually end up anyway (unless you're one of those FOSS crackpots who refuse to use any non-free software).

One's supposed to think that way until finding out that you can't install something you want because Apple (not you) consider it a potential risk to your system. I prefer to have the root pass myself.

Your FOSS tinfoil hat is too tight. OS X is not iOS.

Well, I don't get it as FOSS zealotry... Being not open isn't the greatest issue of OSX, I think other licensing requirements are to blame, like the system requirements: underpowered hardware for high prices. It is not compliant with my system then, so I don't even consider it.

I think the more important question here should be, give me reasons why I would move from Windows to Linux. Too many times people have said "oh, you should try [insert current trending distro]". My question back has always been "why?", and their response is "erm.... erm... it is free... it is open source". I got Windows with my laptop. Why should I switch at all when everything just works? I can watch videos on sites that use Flash for their video player. I can play all these cool games on Steam without any issues (really good that games on Steam are starting to support Windows ans OS X). My TV tunner card works and I can record stuff. As far as I can see there is no reason to switch.Happy to run *nix on my servers, but once I get home I really do want things to just work. For all the stick MSFT gets, Windows 7 does just work when you want to relax. It ain't my developing system of choice (seem to always get stuck with OS X) but when I just want to watch a movie on netflix or play a game on Steam I have no issues.

Answer: skip the Linux step and go directly to a Mac. That's where you'll eventually end up anyway (unless you're one of those FOSS crackpots who refuse to use any non-free software).

I'll go Linux FT before going Mac. I'm not a FOSS crackpot and have no problem paying for software.

Yep, I had to use a mac for some time because of porting some software and my god I really wouldn't want to use one as my main PC for long. I mean I'm sure one can customize it to work sensibly, but the defaults? A bar that shows my programs? What a great idea.. is what I'd say if I'd only ten programs I'd ever want to use. Also the way it shows what apps are open is highly suboptimal if you've more than a handful, etc.

First, car-computer analogies just hardly ever work. They sound good at first and then it all falls apart.

Second, I've used all 3 OSes extensively now. Currently we're running Ubuntu on the laptop, and 7 on the HTPC. I actually find Linux to be quite usable, but you have to do a little research before buying hardware. Some might say that shoots Linux down, but really the alternative is to shell out big bucks on a Mac or cross your fingers on what an OEM does to the standard Windows install to ruin the experience. Doing a clean install of Windows takes a while, and you often have to hunt for drivers for those base system devices that Windows Update can't dig up. Not impossible stuff, but most Linux distros install really easy now, and Ubuntu lets you try with no permanent changes with WUBI.

If games aren't your thing and you want to try Linux, just get a Sandy/Ivy Bridge build and run the HD graphics. It really is about as simple as that, as the remaining components usually get detected just fine. That includes Bluetooth, USB 3.0, wireless, webcams, and card readers. No doubt, Linux has its issues, but depending on the user, a standard install does pretty much everything you need. You CAN tweak Linux, but it really isn't necessary. My wife is a casual user and Ubuntu had held up just fine for her needs too.

Answer: skip the Linux step and go directly to a Mac. That's where you'll eventually end up anyway (unless you're one of those FOSS crackpots who refuse to use any non-free software).

One's supposed to think that way until finding out that you can't install something you want because Apple (not you) consider it a potential risk to your system. I prefer to have the root pass myself.

Your FOSS tinfoil hat is too tight. OS X is not iOS.

Well, I don't get it as FOSS zealotry... Being not open isn't the greatest issue of OSX, I think other licensing requirements are to blame, like the system requirements: underpowered hardware for high prices. It is not compliant with my system then, so I don't even consider it.

1. You don't need to buy the hardware from apple. Just build the box yourself. Wait, can people not do that?2. The lines between OSX & iOS are already beginning to blur and eventually they'll be joined at the hip (much like Windows is about to be with Windows mobile). I would be very worried for any Apple user that they're computer is about to become a giant iphone in the not too distant future. The same can be said for any Microsoft user. Personally, the day that occurs is the day I simply go full Linux and simply give up PC gaming in favor of....a console *shudder*.

If you know your way in and out of C and C++, you should have no problem switching over to Linux. The same typical inconveniences occur in Linux as in Windows: figuring out what you have to link to and finding the documentation.

At least in Linux, you can download the libraries you need with one command. If that doesn't work, you can just fall back to downloading the libraries from the maintainers website, which you ALWAYS have to do in Windows.

Now, one difference in Linux is switching from Visual Studio to GCC. I could be wrong since it's been a very long time since I've last used Visual Studio, but Visual Studio C++ isn't entirely standards-compiant in favor of making things easier on the programmer. It's not that big of a deal, but you should be aware of it.

As for development environments for Linux, Vim/Emacs/Bash/GCC and Eclipse are my preferences. Vim and Emacs work beautifully with smaller projects because you just open up the text editor, write your code, and type in the compile command. No waiting for the development environment to start and you're not restricted to the IDE's demands.

On the other hand, if you're in a project that's going to span over 100,000 lines of code, or even 1,000 lines of code, you might want to consider switching over to an IDE like Eclipse. While the functionality Eclipse offers might not be quite as powerful as Vim/Emacs with Bash and GCC:

* Search/replace* Code completion* Compiler setup* Debugging

... it's all built-in for you, has almost no learning curve, and is integrated as one would expect from an IDE.

With that said, it'll be extremely useful to learn how to use the Bash suite (A.K.A. the command-prompt). Learning how to use tools like sed and awk will work wonders for you.