Live data from Hacker News

Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

news.ycombinator.com

61–70 of 114 posts

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#61
post #46

I disagree with lots of advice here. My strategy to solidify my linux skills was simple: commit to linux desktop. We spend most of our time on our desktop, may as well let that time earn you skill points. I picked ubuntu and use the same on servers. You naturally learn a bit every day through daily use. This really adds up over time without extra effort of using a side system. Getting good at windows or osx is a wast…

> , (5) concise. That rules out C (due to 1) That's interesting, most people I've started on C have found it easier to start out in that than say, Java, which has been on a hell of a lot of introductory courses for a decade now

C is way more concise than Java. It's one of core 5 in any journeymans toolbelt.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#62
post #40

I disagree with lots of advice here. My strategy to solidify my linux skills was simple: commit to linux desktop. We spend most of our time on our desktop, may as well let that time earn you skill points. I picked ubuntu and use the same on servers. You naturally learn a bit every day through daily use. This really adds up over time without extra effort of using a side system. Getting good at windows or osx is a wast…

Commit to using, breaking and fixing a Linux desktop to learn quickly. I learned a lot running Debian Unstable back back when men were men and unstable was really unstable; so the 2010s. If minor things are constantly going wrong and getting fixed then the only way that can happen is the user building up a good mental model of how the system works. An update that breaks X11 will teach you a world of information about…

I would agree with this, but this is underspecified. A couple of examples:

When I was in college, a kid came to our * Nix User Group having fscked up his Ubuntu install by, I kid you not, `cd /; sudo rm -rf * `. He wanted help fixing it.

Another kid who was quite a bit smarter learned about fork bombs and ran one on a shared CS Linux server. It was offline for a few days. When it came back, `who` informed us that the sysadmin spent quite a bit of time running `man limits.conf`. (After graduating, I learned I was able to still login to that server using my SSH key, despite my account being deactivated in LDAP.)

It's a bit like Murphy's Law: anything that can be done on a * Nix machine will be done by a learner given sufficient time.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#63
I’m primarily a windows user and am programming to create products. Since I don’t work a programmer job, my learning is unstructured. Is bash the main benefit of learning something like Ubuntu?

I have delayed making the switch because I have lot of things to learn (currently relearning math, testing out different deep learning architectures, and learning JavaScript (second language after Python)) and not sure if should prioritize learning it.

I still need to get better with GitHub which is something I clearly see the benefits of. Also need to get better with a text editor , using Visual Studio Code , mainly just for text completion in Python and JavaScript, so need to learn the additional benefits. Also want to test sublime text.

I see recommendations for vim, but I wonder if that will make me too twitchy and will start to type before thinking.

So due to the amount of things I am trying to learn, I have delayed learning Ubuntu.

I know Windows 10 now has built-in bash capabilities but I wonder if there are other benefits I am missing with Linux and worth learning.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#65

I disagree with lots of advice here. My strategy to solidify my linux skills was simple: commit to linux desktop. We spend most of our time on our desktop, may as well let that time earn you skill points. I picked ubuntu and use the same on servers. You naturally learn a bit every day through daily use. This really adds up over time without extra effort of using a side system. Getting good at windows or osx is a wast…

JS and php are perfectly suitable general purpose programming languages these days. And given they're both turing complete, they implicitly cover advanced use cases too.

So that leave us with "sound in its design" and I'd argue the absolute unmitigated disaster of python 2 vs 3, the numerous competing competing package managers, and the abundance of really bad code examples due to the influx of the mathematics world (just look at R), I fully disagree that python is a good choice.

But then again, that's just my opinion, but setting people off on an unnecessarily biased path with the assumption that there's only one way to do things definitely sounds like a pythonic behavioral trait.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#66

I’m primarily a windows user and am programming to create products. Since I don’t work a programmer job, my learning is unstructured. Is bash the main benefit of learning something like Ubuntu? I have delayed making the switch because I have lot of things to learn (currently relearning math, testing out different deep learning architectures, and learning JavaScript (second language after Python)) and not sure if shou…

It's just easier to get going with programming stuff on linux (other than .net)

Need python? Ruby? docker? A different compiler or a specific library? They're just an apt-get install away. It just feels more natural and integrated.

Windows has always been an odd duck for programming on.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#68

I disagree with lots of advice here. My strategy to solidify my linux skills was simple: commit to linux desktop. We spend most of our time on our desktop, may as well let that time earn you skill points. I picked ubuntu and use the same on servers. You naturally learn a bit every day through daily use. This really adds up over time without extra effort of using a side system. Getting good at windows or osx is a wast…

There's no such thing as Linux programming without C. You will have to deal with it eventually regardless of how many wrappers Python etc. puts on top of it.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#69

I disagree with lots of advice here. My strategy to solidify my linux skills was simple: commit to linux desktop. We spend most of our time on our desktop, may as well let that time earn you skill points. I picked ubuntu and use the same on servers. You naturally learn a bit every day through daily use. This really adds up over time without extra effort of using a side system. Getting good at windows or osx is a wast…

I agree you need to use it daily but disagree that an Ubuntu desktop provides any real insight.

Here's some BASIC questions an ubuntu user might never encounter:

Which processes are currently hogging the CPU?

Which ports are currently open?

How do you setup a remote git repo and/or add a user for limited ssh?

How do you increase an existing swap part without locking the CPU during write at peak loads?

How do you exclude/include packages from being autoupdated on apt update?

How do you ensure opaque crontabs aren't silently failing?

My advice: Setup a Linux server on aws or whatever for a paying customer with medium load. Only the stress of respondong to actual downtime will teach you anything useful.

Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?

#70
I learned SunOS (and later Linux and HP-UX) by full immersion with a non-root account on a multiuser server. It was non-graphical, though I was able to tunnel X over SSH across the Internet and actually have an almost usable desktop.

I was learning C programming at the time, so beyond dealing with bizarre things like my program crashing due to "segmentation fault"s, I was trying to understand what was going on. The first time I opened vi, I couldn't figure out how to get out. Once I did, I used `:sav %` followed by `:q` for longer than I care to admit.

If I had to recommend anything to someone just learning, I'd recommend learning these commands:

cd ls touch rm # but be careful! ps head tail nano who whoami man apropos # this is technically man less

These will help you do a lot of what you need to do on Linux about as well as you can do similar things on Windows. Once you've mastered those commands, learn about piping `|`, grouping `{ foo; bar; }` and sub-shells `$(foo)`. Learning about variables `$foo`

Then read up on:

grep sed cut find awk # really just `awk '{ print $2 }'` xargs env export test # [ foo ] source # . foo crontab top # or even better `htop` shell control flow

When you're done with that, learn

vim # `vimtutor` can help emacs

After that, there's tons of other tools you'll pick up as needed:

dd df du fsck and a bunch of other system-related tools

You'll learn a ton as you move along.

Just remember that for the most part, each tool solves approximately one problem, and the complex behavior comes from chaining tools together. Chaining mostly involves `|`. Once you see that at work, you probably won't want to go back to the crutch of point-click-drag.

Best of luck!

Post reply on HN