Unix for newbies
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
I know there are some very knowledgable folk around here, so I'd like to pick your brains a little if I may... for my sins I do most of my daily dabbling on OS X, and would like to get more out of Terminal - anybody have any recommendations for a (print) book to get me started? I've tried reading the man pages but if there's a proper physical book I can slob on the sofa/train/etc with, any pointers towards particularly good ones would be kindly appreciated.
- Charlie_Brown_MX
- Location: United Kingdom
- Main keyboard: Apple Extended Keyboard
- Main mouse: Microsoft IntelliMouse
- Favorite switch: ALPS: cream or salmon
- DT Pro Member: -
I found the best way to learn is noodling about, and exploring it. I also found switching over to mutt for my email taught me a lot as I worked out how to use it.
As for books, I found Unix Power Tools a great starter book, and still refer to it frequently.
I should add that I’m a total bumbler in *nix, an make frequent trips to Google and/or books to find solutions to problems that should be straightforward and simple.
As for books, I found Unix Power Tools a great starter book, and still refer to it frequently.
I should add that I’m a total bumbler in *nix, an make frequent trips to Google and/or books to find solutions to problems that should be straightforward and simple.
- sordna
- Location: USA
- Main keyboard: Kinesis Advantage LF / Dvorak layout
- Main mouse: Logitech M500
- Favorite switch: Cherry MX Red
- DT Pro Member: -
Just lookup some books that have decent reviews on amazon, perhaps "Unix for dummies" is worth a shot? I agree with the previous poster, best way to learn is to use it.
Try to actually DO STUFF on it. Want to move/rename/delete a file? Do it from the terminal. Want to create a directory (folder) ? Do it from the terminal. Want to write some notes? Do it in the terminal with console text editors. Then learn how to look for files or for content in files, learn some shell scripting, etc.
By the way, I recommend bash as the unix shell to use, that's the default on OSX anyway.
Do not, I repeat, DO NOT go anywhere near csh or its derivatives.
http://www.shlomifish.org/open-source/anti/csh/
Try to actually DO STUFF on it. Want to move/rename/delete a file? Do it from the terminal. Want to create a directory (folder) ? Do it from the terminal. Want to write some notes? Do it in the terminal with console text editors. Then learn how to look for files or for content in files, learn some shell scripting, etc.
By the way, I recommend bash as the unix shell to use, that's the default on OSX anyway.
Do not, I repeat, DO NOT go anywhere near csh or its derivatives.
http://www.shlomifish.org/open-source/anti/csh/
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
Without doubt the best way to really get to grips is to use it, but I do like a book to read to help me get there. FWIW, I've never really got on well with the "dummies" series, but I've had a few SAMS and O'Reilly on various other topics, with mixed results. That Unix Power Tools looks like a pretty serious tome! I spotted the Nutshell guide from O'Reilly, and a few others - local bookshops don't seem to have much in the way for browsing, so I'll just have to take a plunge some time - so any you've used and can personally vouch for are always good to know of.
Thanks for the input so far chaps.
Thanks for the input so far chaps.
- Mrinterface
- Location: The Netherlands
- Main keyboard: UHK
- Main mouse: G203
- Favorite switch: Monterey blues
- DT Pro Member: 0012
Go zsh........
- RC-1140
- Location: Germany
- Main keyboard: Unicomp Terminal Emulator
- Main mouse: Razer Mamba
- Favorite switch: Buckling Spring
- DT Pro Member: -
Definitely the best way is to learn by doing. Use the shell for everything you can use it for. ls, cd, mv, cp and rm are the most essential tools. Maybe you should have a look at tar as well, less, cat and tail are great tools too. And you should really start using console editors. mcedit (part of the midnight commander file manager) or nano if you're lazy, but if you really want to learn something useful you should have a look at this vim tutorial. vim is hard at the beginning, but the more you use it, the more you like it. Now I even take notes in school using vim. Some others recommend emacs, but in my opinion it isn't as logical as the modal system vim uses. Here's a really great vim tutorial: http://www.openvim.com/tutorial.html
And if you are more advanced, I really recommend you to have a look at the zsh (Z-Shell). It's a great shell, in most cases bash compatible, but the completion and the correction functions are far superior.
And if you are more advanced, I really recommend you to have a look at the zsh (Z-Shell). It's a great shell, in most cases bash compatible, but the completion and the correction functions are far superior.
-
- Location: Poland
- DT Pro Member: -
+1 to the above posts. I actually interact with *nix systems for a living, and despite I remember reading one book in the very beginning, the absolute majority of my knowledge was gained by just doing stuff. Online manuals, tutorials are really helpful in most cases.
- RC-1140
- Location: Germany
- Main keyboard: Unicomp Terminal Emulator
- Main mouse: Razer Mamba
- Favorite switch: Buckling Spring
- DT Pro Member: -
gorkypl wrote:Online manuals, tutorials are really helpful in most cases.
And manpages. Teach a man to use a shell tool and he knows one shell command more. Teach a man to use "man", and he knows how to use nearly every *NIX tool out there.
- Charlie_Brown_MX
- Location: United Kingdom
- Main keyboard: Apple Extended Keyboard
- Main mouse: Microsoft IntelliMouse
- Favorite switch: ALPS: cream or salmon
- DT Pro Member: -
As everyone else has said, doing is the best way of learning. sordna and RC-1140 are both right: do *everything* you can via the terminal. Even file management. Once you get used to it, it’s much more efficient for certain tasks than the GUI: is a lot easier than hunting for, then dragging across, all your text files.
Anything you want to automate you can automate using shell scripts, and should. I learned a lot doing that.
I’m almost totally useless in vim, but I recommend learning it. It’s so powerful, and you can do some very advanced things very easily. It’ll give you the skills to use vidir, which is insanely good at working with directories of files if you want to rename them. (It probably does other stuff too, but that’s all I’ve used it for so far.)
Since you’re using a Mac, I recommend Mac Ports: it makes installing and removing packages so much easier. Also, Lingon makes creating and amending launchd tasks *much* easier.
Code: Select all
mv *.txt ~/Documents/Text\ Files
Anything you want to automate you can automate using shell scripts, and should. I learned a lot doing that.
I’m almost totally useless in vim, but I recommend learning it. It’s so powerful, and you can do some very advanced things very easily. It’ll give you the skills to use vidir, which is insanely good at working with directories of files if you want to rename them. (It probably does other stuff too, but that’s all I’ve used it for so far.)
Since you’re using a Mac, I recommend Mac Ports: it makes installing and removing packages so much easier. Also, Lingon makes creating and amending launchd tasks *much* easier.
- Gilgam
- Location: france
- Main keyboard: Too many
- Main mouse: CST trakball
- Favorite switch: red ?, maybe topre, well no, black... Or brown???
- DT Pro Member: -
there was a book "Unox for macosx" or something like this.
But beware ! this will make you switchn to linux. This is what i have done, macosx, unix, then linux and i still use macosx on old machines, but that's all.
But beware ! this will make you switchn to linux. This is what i have done, macosx, unix, then linux and i still use macosx on old machines, but that's all.
- 7bit
- Location: Berlin, DE
- Main keyboard: Tipro / IBM 3270 emulator
- Main mouse: Logitech granite for SGI
- Favorite switch: MX Lock
- DT Pro Member: 0001
This is a good start:
http://www.catb.org/
http://www.catb.org/
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
Thanks for the input chaps - I've decided to pick up one of the O'Reilly 'nutshell' books on bash/unix, and keep reading the manpages and dabbling...
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
OK, so I'm chipping away at this gradually, and learning what not to do.
Can anybody help me with something as basic as printing? I'm on OS X Lion, using Terminal (bash).
I've set up a printer, which is showing up just fine when I enter, but when I try to print anything, for example (where test is a text file), I get pages of stuff that looks like code, header info, etc. and I have to cancel the job and turn the printer off and on again. I mean, pages of stuff - it just keeps coming. To the point where I have seven pages of junk and no actual file content yet.
Anybody know what might be happening, and how I just print what's needed? I can't seem to find any info online that helps.
Can anybody help me with something as basic as printing? I'm on OS X Lion, using Terminal (bash).
I've set up a printer, which is showing up just fine when I enter
Code: Select all
lpc status
Code: Select all
lp test
Anybody know what might be happening, and how I just print what's needed? I can't seem to find any info online that helps.
- 7bit
- Location: Berlin, DE
- Main keyboard: Tipro / IBM 3270 emulator
- Main mouse: Logitech granite for SGI
- Favorite switch: MX Lock
- DT Pro Member: 0001
Did you try to print a PostScript file?nathanscribe wrote:OK, so I'm chipping away at this gradually, and learning what not to do.
Can anybody help me with something as basic as printing? I'm on OS X Lion, using Terminal (bash).
I've set up a printer, which is showing up just fine when I enter, but when I try to print anything, for exampleCode: Select all
lpc status
(where test is a text file), I get pages of stuff that looks like code, header info, etc. and I have to cancel the job and turn the printer off and on again. I mean, pages of stuff - it just keeps coming. To the point where I have seven pages of junk and no actual file content yet.Code: Select all
lp test
Anybody know what might be happening, and how I just print what's needed? I can't seem to find any info online that helps.
Usually it should just prinbt a text file as expected, but maybe the configuration is wrong.
Did you try lpr?
lpr -o raw file.txt
Did not try anything, because I don't have a printer at home.
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
I have a simple file which I called test that is simply hello, world in pure text and nothing more. I generated it from the command line, not in a text editor, so it's as basic as it can be.7bit wrote:Did you try to print a PostScript file?
Usually it should just prinbt a text file as expected, but maybe the configuration is wrong.
Did you try lpr?
lpr -o raw file.txt
lpr gives absolutely nothing - no activity at all.
- captain
- Main keyboard: main? main? what is main?
- Main mouse: Mickey
- Favorite switch: it's complicated
- DT Pro Member: -
Best book ever written for Unix sysadmins:
http://www.amazon.com/Linux-System-Admi ... 0131480057
That's the Fourth Edition. I have to assume it is still as good as the first. I believe that Donald Knuth is quoted in there with something that constantly resonates in the back of my mind, "10 years of email should be enough for anyone."
Oh, and learn to use the command "apropos". Like "apropos printing", then RTFM.
http://www.amazon.com/Linux-System-Admi ... 0131480057
That's the Fourth Edition. I have to assume it is still as good as the first. I believe that Donald Knuth is quoted in there with something that constantly resonates in the back of my mind, "10 years of email should be enough for anyone."

Oh, and learn to use the command "apropos". Like "apropos printing", then RTFM.
Last edited by captain on 02 Jun 2012, 20:41, edited 1 time in total.
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
captain wrote:Oh, and learn to use the command "apropos". Like "apropos printing", then RTFM.

@7bit: for now I just uninstalled the printer, and will reinstall again - not even sure about those config files you mention, that's how n00b I am. I've already wasted plenty of paper on this, and even stopping the thing once it gets going has been a headscratcher. No doubt it's something fairly simple for those in the know, so I'll experiment further and report back.
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
Wrong driver selected during setup in OS X. Duh.
Still, now it seems to print one thing and then halts, ignoring all subsequent input. Hmm.
Still, now it seems to print one thing and then halts, ignoring all subsequent input. Hmm.
-
- Location: Texas
- DT Pro Member: -
Which UNIX OS are you going to use (not OS X)? Since most UNIX systems are servers - set up server. I'd suggest starting with Ubuntu Server (with no GUI) since they have tons of experienced people on their forums and they are glad to help. You really need to just dive in. Once you get the basics down in Linux then move over to UNIX. O'R'eilly has a few nix books that are pretty good.
- TexasFlood
- Main keyboard: Rosewill RK-9000 original cherry blue
- Main mouse: Microsoft trackball
- Favorite switch: cherry blue
- DT Pro Member: -
Agree, back in the day the primary was always the Evi Nemeth System Administration Handbooks. After that we'd tend to have some O'Reilly books like Essential System Administration, DNS and BIND, Sendmail, TCP/IP Network Administration, etc. Depends on what your needs are.captain wrote:Best book ever written for Unix sysadmins:
http://www.amazon.com/Linux-System-Admi ... 0131480057
That's the Fourth Edition. I have to assume it is still as good as the first. I believe that Donald Knuth is quoted in there with something that constantly resonates in the back of my mind, "10 years of email should be enough for anyone."
Oh, and learn to use the command "apropos". Like "apropos printing", then RTFM.
- nathanscribe
- Location: Yorkshire, UK.
- Main keyboard: Filco tenkeyless w/blues
- Main mouse: Kensington Expert
- Favorite switch: MX Blue
- DT Pro Member: -
At the moment I'm dabbling at home with OS X (Terminal.app), and the newly-acquired Raspberry Pi is running Debian, but I want to learn how to do things from the command line - I'm not doing this as a job, it's purely out of interest.smknjoe wrote:Which UNIX OS are you going to use (not OS X)?
[snip]
O'R'eilly has a few nix books that are pretty good.
I've got a few books on my wishlist now, so no shortage of stuff to spend money on and time reading.
