5 Replies - 955 Views - Last Post: 16 February 2017 - 07:14 PM

#1 Wonkas_Willy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 29-January 17

Is learning Unix necessary?

Posted 30 January 2017 - 05:43 PM

Maybe I'm answering my own question here but, if I ever decide to get in the programming field, or any IT field really, how beneficial will it be to get familiar with the Unix OS? I've only ever used Windows for most of my computer using life, but when I watch IT related youtube videos, I always see guys using either Mac or Unix (Unix? Linux? Same OS?). I see these guys streaming through the command prompt (or is it terminal) like it's nothing and I always wonder how long it takes these guys to get familiar with all that.

Is This A Good Question/Topic? 0
  • +

Replies To: Is learning Unix necessary?

#2 jon.kiparsky  Icon User is offline

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10625
  • View blog
  • Posts: 18,185
  • Joined: 19-March 11

Re: Is learning Unix necessary?

Posted 30 January 2017 - 06:28 PM

There are windows shops out there, and I've worked in one, but in general serious computing is done on POSIX-compliant machines. The degree to which this will matter to you depends largely on the size of the organization you work for - larger organizations tend to segregate dev ops tasks from programming tasks, but small and medium organizations tend to look for more "full stack" folks. On my current team, and on the last team I worked on, not having a linux/unix background wouldn't be an immediate deal-breaker, but it would weigh pretty strongly against you. Interestingly, the one windows shop I worked in was the one where my unix background was the most useful to me, since it was the one where I went from being a technical writer to being the de facto sysadmin on the unix system that the secret back-end team worked on. (I say secret because I hadn't even known that they existed until someone came into my area and said "hey, you with the beard and ponytail - the linux is broken, come make it work")

Unless you have a game plan that you think will keep you on windows machines for at least the medium-term future, I would strongly advise you to start learning your way around linux.

Quote

I always wonder how long it takes these guys to get familiar with all that.


Like any other programming skill, it's a continuous process, not a discrete jump. You start out learning a few simple commands and as you use the OS you find that almost everything you do can be done a little easier if you learn a little more - eventually, you find that other people don't know all of the things you know, and you look like a guru.
Was This Post Helpful? 3
  • +
  • -

#3 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6544
  • View blog
  • Posts: 30,650
  • Joined: 10-May 07

Re: Is learning Unix necessary?

Posted 31 January 2017 - 05:48 AM

View PostWonkas_Willy, on 30 January 2017 - 07:43 PM, said:

I always see guys using either Mac or Unix (Unix? Linux? Same OS?).


Mac OSX is build on FreeBSD, which is Unix.

Linux is any distribution that uses the Linux kernel. Debian, Ubuntu, Mint, RedHat, Fedora, Slackare, Gentoo, & so on, can all update using the Linux kernel source.
Any Unix OS is going to use it's own proprietary kernel source base. FreeBSD, NetBSD, OpenBSD, Solaris, Aix, HP-UX, none of these guys share, & nothing says that their kernel source must be offered.

As far as your question goes, define necessary. It's just more of an edge, if you are working closer with that technology. For example, a web developer isn't going to gain much by knowing & understanding hardware. However a developer coding is C could have an advantage having had a background with assembler. While it certainly helps to have more tools in your belt, it is only as necessary as your desire requires it to be. That being said, it could hurt you not knowing it, or it could waste your time learning it.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,569
  • Joined: 12-December 12

Re: Is learning Unix necessary?

Posted 31 January 2017 - 06:53 AM

If you are primarily a Windows users then I urge you, and everyone else, to become comfortable with the command prompt - MS-DOS commands and batch files. I studied these many years ago and the knowledge has always held me in good stead. Unix commands will not be a total mystery and can often be understood/translated with a little help from Monsieur Google.

If you get the opportunity or, importantly, have the interest, then, yes, spend some time with a nix terminal.
Was This Post Helpful? 0
  • +
  • -

#5 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2386
  • View blog
  • Posts: 5,008
  • Joined: 11-December 07

Re: Is learning Unix necessary?

Posted 16 February 2017 - 06:13 PM

I think learning unix is the wrong mindset. It makes it feel like an epic undertaking.

How about shooting for some familiarity in BASH. If you need an excuse, it's now available in Windows so whatever you're working on, you're likely to have access to BASH.

Here is a quick suggestion, take three evenings in the course of a week and do a quick intro:

Evening 1: Familiarity using the command line

* changing the directory (cd)
* listing files (ls)
* making and deleting directories (mkdir|rmdir)
* making an empty file (touch)
* outputting to the console (echo)
* redirecting output to a file (>)
* deleting a file (rm)
* showing processes (ps)
* killing processes(kill)
* finding files (find)
* searching within files (grep)
* reading a command's manual (man) *
* find out how to execute programs in your favourite language

* I hardly ever use man from the console. Googling (e.g. man ls) usually results in a better user experience. Occasionally this results in getting the manual for the wrong version of the command (I've experienced this with grep) but this is relatively rare.

Evening 2: Familiarity with vi (a text editor)
vi is powerful but not intuitive. In 1 evening you should expect to be able to use it like Notepad, but the sky is the limit.

* Editing text almost like notepad in insert more (i)
* Using the escape key to get back to command mode ([Esc])
* undo (u)
* Saving the file (:w)
* Quitting the editor (:q or :q!)
* highlight text (v)
* cut, copy, paste (d, y, p)
* As a bonus, look up how to execute BASH commands from within vi. This is really useful for a programmer!

[Be wary of beginner vi tutorials. I have yet to find a good one. They focus on things like moving the cursor without using the arrow keys and give you several subtly different versions of each command (e.g. pasting before the cursor and pasting after the cursor). This stuff does have real use cases but its too daunting for the first hour or two of using the editor.]

Evening 3: Harnessing the power

* Piping commands (|)
* Writing and executing basic shell scripts, using piping and the learning from evening 1. Write the scripts using vi.
* permissions (chmod) unfortunately a prerequisite to executing shell scripts

To aid your familiarity, whenever you need to do something, use the command line in preference to a gui if you can. If you're struggling then you can always google. However, make sure you understand the command before you copy and paste. It's good for your learning but also prevents you executing a harmful command.
Was This Post Helpful? 2
  • +
  • -

#6 jon.kiparsky  Icon User is offline

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10625
  • View blog
  • Posts: 18,185
  • Joined: 19-March 11

Re: Is learning Unix necessary?

Posted 16 February 2017 - 07:14 PM

Quote

I think learning unix is the wrong mindset. It makes it feel like an epic undertaking.
How about shooting for some familiarity in BASH


This is a subtle distinction for the novice, but yes, this is the right place to start.

For the novice: a "shell" is the interface between the user and the machine. When people talk about "using the command line" what they mean is working with the machine by issuing commands to a shell. This is really just another programming language which is most often used interactively (issuing one command at a time for some immediate effect) but it can also be used to write small programs, which are traditionally referred to as "scripts" (this is where we get the term "scripting", as in "scripting language", or "shell script")
"bash" is the name of one of the most popular shells for the POSIX-compliant operating systems. ("compliant OS's", or "UNIX", for short).

I agree with cfoley's focus on getting in and learning by using it, and I agree that vi is a great editor - the second-best editor in the world - and well worth learning in case you ever find yourself on a machine without emacs. :)

I don't think you'd do yourself any disservice by following his three-evening prescription. You can follow up on that by taking a look at the Free Software Foundation's book on the GNU/Linux command line, which can be read in its entirety for free (natch!) at http://write.flossma...e/introduction/
(if you like, you can buy a hard copy from the FSF and support their work - this is a nice but completely optional gesture)

Some further follow-up materials would include:
  • Kiddle, Peek, and Stephenson's book "From Bash to Z Shell" which is a good comparative survey of different shells - excellent for getting a deeper familiarity with the different tools available to you and what sort of spooky magic they can offer you
  • Eric Raymond's The Art Of UNIX Programming, which is almost a title in the philosophy of programming. It deals with the UNIX mindset and how this mindset underlies most of the ideas which have become accepted as "best practice" in programming. Raymond is a fascinating character, with a number of titles in the canonical literature of programming. His works are for the most part available for free on the web, and they can also be purchased in hard copy if you wish.
  • The UNIX and Linux System Administration Handbook by Nemeth et al is the single best compilation of arcane knowledge about the inner workings of the various compliant operating systems. This gets away from questions about how to get bash to do your will, and gets into issues about where power resides in a UNIX-flavored system. Probably not your next purchase, but sooner or later you will probably want to invest in this one.
  • There are also some books that go into the nuts and bolts of how UNIX actually works - this can certainly be put off for quite some time, but if you become curious about what all of these commands ultimately mean, something like Maurice Bach's "The Design of the UNIX Operating System", while quite dated, will give you a view into those depths.
  • Drew Neil's "Practical Vim" will help you get deeper into effectively using the vi editor*. Neil is far too obsessed with counting keystrokes for my taste, but he will show you a lot of useful tricks for making best use of vi, particularly of the vim implementation.


I'm sure there are many other ideas out there, these are just a few from my shelf.
Best of luck!


* terminology note: "vi" is the name of the original editor, which serves to define the standard, and so we generally use that as the generic name for a vi-flavored editor. "Vim" is the most common implementation of that standard.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1