Want to learn Linux but scared to damage system

18 points by shivajikobardan ↗ HN
Firstly I am an aspiring web developer. Everyone has been saying "linux, learn linux" to me. I'm not understanding why that's the case. But personally, I love linux because it makes my life easier. No BSODs, no need to restart after installing package, one command package installation, great software center, wonderful community like linux org, hackernews and reddit. And what not.

But I'm "zero" on linux. My biggest issue is data and being a poor guy, I can't afford extra backup system because they cost 4x the amount they cost in US.

So, I decided to again reinstall windows. But I still want to learn linux. Is there a way for me?

My laptop isn't powerful enough to support virtual machine.

Is there a way to learn linux for me? And how'd linux help me in my web development journey? I've heard every servers use linux. Do I need to use linux OS to learn linux?

I don't want to dual boot because it's not recommended that much.

43 comments

[ 2.5 ms ] story [ 98.5 ms ] thread
get a raspberry pi for $30
thanks I'll get it instead. I'm actually seeking for new computer, that'd be great if it works.
You can also get a DigitalOcean cloud VM for 5 bucks, and there are a lot of services that give you free credits too, like GitHub's student pack [[0] which has 100 dollars worth of credits for a year. At the 5 dollar a month level that should last the entire year.

[0] https://education.github.com/pack

or even AWS free tier for a year
peak hackernews: the best answer is at the bottom
where on the internet can you get a raspberry pi for 30€? search yields results for over 100€ for one
then buy an odroid or something else on aliexpress

raspberry pi is overrated garbage anyways. look into some asian chip manufacturer boards.

Agree about Raspberry Pi being flaky - mostly due to cheap SDcards and/or people switching the power off without shutting down the system. But that is a typical problem with Linux on any hardware without ACPI.

Although the various Chinese Linux boards are good value for money, the documentation is often hard to read for a beginner. With the Raspberry Pi there is a mass of learner oriented materials on the internet.

As for buying a Raspberry Pi at a fair price, check out Raspberry Pi Foundations website for links.

You could install Linux on the USB drive, and then tell your laptop to boot from it instead of your laptop's hard drive when you want to use Linux.
If s/he can unplug the hard drive, it'd be a bit safer. Because a stray dd of=/dev/sda or the likes could still wipe out his/her hard drive...

Reminds me of an anecdote of Linus' colleague, one day Linus' brain farted while trying to connect to his ISP, and he was left with "ATDT" followed by his ISP's phone number as the first bytes on his hard drive...

Dual booting works fine, just don't mess with the Windows partition if you're anxious. Better yet, just find an old computer. It doesn't need to be good, a 10 year old laptop with 2 or 4gb of RAM will do fine.

If you have always-available internet, you can find a free server online. Just get an account on Python anywhere (for example) and you'll have access to a Linux console. Or install a terminal emulator in your phone, which is already running some unix variant underneath the GUI.

>I don't want to dual boot because it's not recommended that much.

Who doesn't recommend it? It's absolutely viable and easy to do[0].

Another option might be WSL[1] which lots of people like. I don't use it myself, but apparently it works pretty well.

Another option would be to install Cygwin[2][3], which will provide you with most of the unix/linux toolset. The advantage here is that you don't need to install Linux at all.

all of the above have the ability to install servers (nginx/apache/postgres/etc.), use linux dev tools (clang/gcc/gdb/php/Node/React/etc.), run unix/linux shells and utilities/GUIs and provide you with a linux or linux-like environment from which to learn.

[0] https://www.freecodecamp.org/news/how-to-dual-boot-any-linux...

[1] https://learn.microsoft.com/en-us/windows/wsl/install

[2] https://www.cygwin.com/

[3] https://www.cygwin.com/cygwin-ug-net/ov-ex-win.html

Edit: Replaced incorrect link for WSL.

Don’t get caught up in peoples advice. Focus on the web dev stuff and actually get it deployed and try to get actual users. Everything will follow from that. Being told to learn linux is brain dead advice. You’ll learn linux like most people. Learn what you need when you need.

* I speak as someone who used to tell newbie web developers to learn linux and ultimately pushed them away.

This is the most practical advice, don’t make yourself read a book on a language or platform with the hopes that it’ll make you better. In some ways it will, but your better off being driven by ideas to apply or curiosity.
> My laptop isn't powerful enough to support virtual machine.

This seems unlikely. I was using vmware in 2001 or so on a Compaq Armada e500, which wikipedia tells me had a Pentium III 700 Mhz with 64MB of ram.

Use a compact Linux install, don't install X or Wayland, and give it a small amount of memory, and it will be fine on a laptop from the past 10 years, maybe the past 15.

NetBSD is a better option on under-powered old PCs. Although it is not Linux, it is actually more like Unixes used by IBM, HP, Sun.
Linux Mint preinstalls a backup solution, Timeshift, which can make a complete system backup (if you also include your home folder) on the same drive. You can then restore the backup from the USB install medium. I have used that a few time already to restore the system to an earlier state. It works like a charm. So, as long as you make a backup before, go ahead, destroy your system :-)
Also, do not believe them and log in as root. It saves you a lot of typing, and you will be prepared for being root user on a webspace.
Run a VM (even if it's slow) or rent a cheap VPS (lowendbox.com is my go to), you can get a cheap Linux server for maybe $5 a month.

And you know what ? I highly advise YOU DO DAMAGE the system! many times over, and over. This is the best way to learn. Do experiments on that Linux, one at a time. You ARE going to break things, and that's okay. Learn how to fix them - you'll be a master in no time. Yes, this means running "rm -rf /", see how the system reacts to that (keep a shell session open, but also try opening another session, such as via SSH). Try to fill up a drive, fill up memory, see what happens etc etc.

Cheers

I always recommend ZorinOS to beginners. It's a great distro that doesn't require any extra configuration. It's made for people coming from Windows and MacOS, you can give it a try.

And don't worry about breaking the system, if the live USB works fine ZorinOS is stable enough to not break on its own. I've been using it for years for webdev (and I switched from windows too) and none of my installations have failed. ZorinOS is rock solid, in stability compatibility and usability.

As others have pointed Ubuntu Subsystem for Windows is your best bet, especially if you really want to learn the Unix shell. That’s the main characteristic that separates from a Windows experience.

I honestly doubt your computer can’t handle a VM, just use a distro small and light like Ubuntu Mate or Lubuntu.

Linux probably won’t t help you with web development as LAMP is pretty much dead in the modern industry, but it will give you insight into the backend of web architecture.

I agree about dual booting, it’s finicky, not very fun to setup and can be dangerous if you’re novice.

IMO you don't really need to learn Linux anymore to be a web dev. It used to be common in the past few decades, but these days most of it is abstracted.

I would learn (in this order): HTML, CSS, Javascript basics, Git, a good IDE (Webstorm or VSCode), React or similar, Next or similar, advanced Javascript.

A good IDE will take care of most of your file and version control needs. The command line isn't as important as it used to be.

Is your main computer a Windows computer?

A lot of people are recommending WSL (Windows Subsystem for Linux), but personally I think Hyper-V, Microsoft's hypervisor, would be a better option.

I suppose you would know best, but it's hard for me to imagine your laptop being unable to support this. You don't need to install any graphics, you can just SSH into your own VM as if it was a Linux server in the cloud (except it's, say, a 512mb ram, 8gb hdd, 1vcpu local vm)

WSL2 is based on Hyper-V.
Yeah! To be clear, it's not for any kind of performance or tech stack reason. As you said, it's the same thing at the end of the day. Rather, in my opinion, making the underlying VM more obvious is probably a good thing for learning Linux.
Work on it in a VM. And if you manage to damage it either use a backup copy of your system image or learn to repair it.
First, like many of other commenters said, as an "inspiring web developer":

focus on your development process not your operating environment.

Second, if you have internet connection just use free tiers of cloud providers' virtual private servers or even better use public access systems like freeshell, blinkenshell or sdf (this one not exactly linux but can open the door of a different experiences).

https://freeshell.de/ https://blinkenshell.org/wiki/Start https://sdf.org/

Third, dual boot with MS Windows or virtualization not that hard, just try.

Fourth, this is kind of counter argument to my first point but probably best in my opinion; come on baby, don't fear the reaper... Joking aside, don't fear and just break things and you will be alright; once upon a time, we were all there poor and without constant and fast connections, free services, online communities, etc. and we survived.

Recommended.

You could try mucking with cygwin or msys2.

Cygwin gives you a posix development and runtime under windows.

msys2 gives you a posix development environment under windows for cross compiling applications that run native under windows.

Also look into cloud based VM's.

As others have said, web stuff under windows has gotten a lot better in the last 10-15 years. Guy at work is going a react based website for us on a windows machine.

You can keep using windows for now and use WSL to play and explore linux. Make the swith if you feel you need the full power of the linux system.
Learn what you want to learn, and be honest about it. It doesn't sound like you're looking to learn Linux because you want to but feel like you ought to. Well that's not going to inspire you at all! Park that for later, Linux will wait for you.

One thing I will say as someone who habitually has broken install after install learning OS's, Applications, toolchains and the rest of it, keep the important stuff away from the OS, even if it's only backups. What I mean about that is assume today is the day that you realise that you have to wipe the disks and install your OS from fresh, so that being the case make sure you can get back to work quickly and without massive pain.

If you do that you'll find that your a hell of a lot more comfortable with 'hmn, haven't seen that big red button before, what does that do?' and subsequently nuke the whole OS. That's not a bad thing, that's investigation, analysis and good old fashioned curiosity.

Final thought.... You'd be suprised at what your machine can do. Ok, so right now VM's are off the table, but I'd wager that future you will have a different perspective. I'm not saying 'guh, go do VM, you must learny the machines that is virtual', I'm saying learn at your own pace, go git gud just by doing and see how it all looks afterwards.

..also, break shit, but break shit in an environment where you can laugh about it, not cry.

How do you think you'll "damage" your system? The only way I can see you losing data is if you go around haphazardly rm -rf. Even if your boot sector breaks for whatever reason, your data should be still recoverable with a liveUSB.
From what I can understand, losing data would be too great a risk for you, so I think you won't learn easily, because you might be scared of exploring the system.

IMHO, the best way to learn is to try everything, there are many things to learn and you will learn most when making mistakes, I know I did. Very few of my mistakes compromised the data, and I made many mistakes while tinkering with Windows too.

You can use distros like Ubuntu just like you use Windows without opening a terminal, and the risk of losing data will be minimal, just be careful while installing, learn filesystems, store data you don't want to lose in a separate mount point, maybe mount it read-only if you don't need to write to it.

I made a lot of mistakes with GRUB bootloader. It was very frustrating, now I'm not afraid to use it and triple boot OSes, because there are many ways to recover, but they can be complicated and as a newbie, It'd be hard to do on your own.

Install it in a virtual machine even though you say your laptop isn't powerful enough. Give it the minimal amount that it needs to do anything. Try to break the system. Do it! You don't learn unless you break things! If you're constantly scared of messing up or screwing up or doing the wrong thing or misconfiguring something then you're not going to be adventurous enough to learn.
> My laptop isn't powerful enough to support virtual machine.

Specs please?

P.S. I provide Linux courses, and would be glad to teach you using 1:1 video chat. Nothing will be needed except a web browser and an SSH client (which is built into all major desktop OSes now). I have slides for 40 two-hour presentations, with practical exercises that can be done in a virtual machine or on a VPS. Topics include the most common shell commands, package and service management, networking, security, supply chain questions, running web applications in production, and even source code compilation. The course is delivered using multiple distributions, to highlight common things and differences (i.e. so that you can know the extent to which you can apply the information in Arch Wiki while running e.g. Debian). The first two lessons are free. Send email to patrakov@gmail.com to learn about the pricing. Regarding my credentials - I am a former editor of the Linux From Scratch book, and a former maintainer of their LiveCD.

You do a free trial of two 1:1 lessons? That sounds like an incredibly expensive way to acquire students.
Invest in a cheap PC less than $200.

Install a free OS (Linux, BSD).

Read manuals.

Learn.

That’s what I did.

Elevated iteratively hundreds of time (including the famed `rm -rf / whatever/you/typed`.

You become a subject matter expert in the topic of your own choosing.

Thomas Edison tried a thousand way to make the filament in a lightbulb that lasted.

Get a different machine. Any will do. Go to a recycling center and buy one for twenty bucks. Check whatever the equivalent of craigslist is in your area. Ask if someone has a computer in the basement he discarded in 2005. Then take that machine and experiment with it. In my opinion it's important that you don't have any fears while tinkering, which you'll inevitably have when risking the ruin of your work manchine and the loss of your data. When you installed the distro you wanted to try, use the machine as a media box. When you run into issues, fix them. Then repeat. You'll figure out the system naturally.