Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
31–40 of 114 posts
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#32Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#33I 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…
The skills you need to run Linux on the laptop aren’t particularly close to what you’d need to run Linux as a server, IMO, particularly Linux as a VM.
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#34Earlier quoted context omitted.
I’ll probably use my raspberry pi instead of installing a VM.
Sure - the only benefit of a VM is that you can mess up the VM's filesystem without worrying about it too much.
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#35Once you grasp how powerful this closed system of incrementally processing text is, you are sort of unstoppable at the command in a *nix system.
Pay careful attention to regular expressions, which are a universal tool in Unix for processing text. Along with Unix' treatment of files as a stream of newline terminated strings, this how Unix gets away with working with unstructured files instead of something like XML or S-expressions): that is, most Unix tools expect you to work with a file (or file descriptor, which is a pointer to any file-like thing in memory), and to process it one line at a time, and to use regular expressions to parse those lines into fields.
Working with lines using regular expressions is how the original editor, /bin/ed, was conceived, before the existence of visual editors like Vim and Emacs: you can find, print, and also edit lines in the file using regular expression syntax in ed, and this knowledge, btw, translates to fluent use of regular expressions in both sed ("stream editor", or basically a non-interactive version of /bin/ed, which essentially executes your editor commands and then exits), and egrep (which searches for lines matching your regular expression).
In fact, once you start to see these pieces come together, look for examples in Kernighan and Pike[0] which demonstrate the use of awk. Awk is an extremely powerful but also extremely simple tool for processing data in Unix, using all the concepts I just described, and not much else. It has a few extra features, like variables and loops, which you'd expect in a programming language, but you are expected to use Awk exactly like you'd use things like grep, ed, and the shell. It's just that now you've got this very compact, powerful notation for splitting records (lines) into fields (regular expression matches), and then doing arbitrary things with them to spit text back out. You could even write your own database using something like Awk, and you can read about how to do database-like tasks in the classic and accessible book on Awk by the original authors of the tool (Aho, Weinberger, and Kernighan, whose last initials together form the name AWK)[1].
Then, much later in life, when you find yourself doing some fancy stuff in Haskell and creating a DSL to do things like process pipelines, you realize that Awk was actually way ahead of its time.
[0] https://en.wikipedia.org/wiki/The_Unix_Programming_Environme...
[1] https://en.wikipedia.org/wiki/The_AWK_Programming_Language
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#36I 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…
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#37- Customize your bash prompt, create aliases for some common commans (ls, df are good)
- Build a LAMP stack, compile everything from source tarballs. Get it working so that you're able to browse your webserver from your phone.
- Update a sound or video driver
- After you're comfortable, recompile the kernel
- Through these, do as much in the command line as you can. Get comfortable with mv rm chmod chown and so on.
Any time you have edit a text file, use vim, nothing else.
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#38I 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…
Counterpoint: I’ve been a Linux sysadmin and developer for close to 10 years at this point and I’ve never used Linux as a desktop. I’ve only used MacBooks. The skills you need to run Linux on the laptop aren’t particularly close to what you’d need to run Linux as a server, IMO, particularly Linux as a VM.
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#39I 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…
Counterpoint: I’ve been a Linux sysadmin and developer for close to 10 years at this point and I’ve never used Linux as a desktop. I’ve only used MacBooks. The skills you need to run Linux on the laptop aren’t particularly close to what you’d need to run Linux as a server, IMO, particularly Linux as a VM.
I felt that I really started understanding how things work when I switched to something requiring more reading - Archlinux.
To get a running desktop it not only required doing all kinds of things I did not understand back then, it also provided great Wiki to get there. I still sometimes end up in that Wiki to quickly get up to speed about some tools or concepts.
And the fact that it is rolling release distro and was always running the latest upstream software version meant that frequently at least the UI part broke down, and that forced me to learn even more things. :)
That was only the beginning but now it feels like it opened many possibilities and career paths for me. It probably was a bit frustrating at the beginning but it is worth it.
Re: Ask HN: How can a intermediate-beginner learn Unix/Linux and programming?
#40I 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…
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 terminals. "How do I use a messaging client in a terminal?", "What text editors work in a terminal?", "How do I browse the web from a terminal?", "What games are there for terminals", "How do I watch a movie in the terminal" (ascii).
Get forced to live like that for a week and you also learn how to fix X11 (eg, learning about the difference between 2D and 3D graphics drivers, OSS vs non-OSS drivers, kernel vs userspace). Valuable life skills. Godspeed to the Wayland devs.