Live data from Hacker News

Devops/Sysadmin Cheatsheet

rubytune.com

81–90 of 110 posts

Re: Devops/Sysadmin Cheatsheet

#81

Meta question: where do you actually learn this stuff? I am a developer with an intermediate desktop level command line knowledge learnt mostly on the job but would appreciate a crash course on system-level command line, diagnostics, devops, etc.

In my experience, you pretty much learn this on the fly. You don't know how to do X, you google it, if you do X often enough, you'll eventually learn. After a while you end up mastering most of the unix suite (ls, grep, awk, du, etc..) so instead of googling stuff you write it.

Unlike fundamentals (think books like SICP, Introduction to Algorithms, K&R, the Dragon book, et al), this is just a collection of useful commands that do not bring barely any collateral learning aside from learning the 'UNIX' way.

If you really want to put up the effort to learn this, and you don't have any projects or anything that requires this knowledge, I've noticed lots of tech offices have a copy of UNIX in a nutshell always have a copy around. I've checked it out myself and it's pretty useful (I already 'know'), not sure how good is it for learning this stuff from the ground up.

Re: Devops/Sysadmin Cheatsheet

#82
post #16

Some random thoughts: - Instead of 'while true;' you can use the shorter 'while :;'. ':' is a null command. - On OS X, dtruss is kinda, sorta like strace (it's a wrapper around dtrace, and the dtruss name comes from Solaris). - For basic host to IP resolution, I prefer ping as it calls gethostbyname(), like most other programs will do. host/dig are suitable for querying/testing DNS independent of how the local box is…

ctime is also useful because it's harder to forge. You can normally set the mtime on your files to whatever you want, but forging the ctime normally requires either directly modifying the filesystem structures on disk, or changing the system clock.

Re: Devops/Sysadmin Cheatsheet

#83
post #24

Thanks for this nice list. Small nitpick/question: why put the commands in inputs? Do you edit them on that page? Or is it just to format them? I tried to do a copy/paste on the page contents to my personal offline notebook but the most important bits, the commands, didn't paste.

Ack! I'm sorry! I started out with "pre" elements, but they were causing problems with copying and pasting (it looked odd, and it added a dreadful newline so the command would execute on paste!)

The plan is to have a pdf shortly; that will most definitely be copy and pasteable.

Re: Devops/Sysadmin Cheatsheet

#84
post #18

Okay, I'll admit it. I don't actually know what devops is. I know what developers do and what sysadmins do. Is devops just a buzzword for one person who can do both? Or does it mean something other than that?

After giving it a thought, i'd say it's just a new buzzword for sysadmin.

Because, atleast in my understanding, it's totally in the working area of sysadmins to set up a server, install and configure software, configure monitoring, etc. The typical sysadmin will also write scripts and stuff to do that.

My bet is that it just came up by some angry sysadmins who felt like they need to differentiate from the dumber kind of admin who can barely touch a shell.

Of course a software developer may also write deployment scripts and similar stuff, so that's where it becomes fuzzy.

I never really thought about that term, but thanks to yyour question i just figured that i will drop the term from my vocabulary. It's too fuzzy, it's too much of a buzzword.

Re: Devops/Sysadmin Cheatsheet

#85
post #81

Meta question: where do you actually learn this stuff? I am a developer with an intermediate desktop level command line knowledge learnt mostly on the job but would appreciate a crash course on system-level command line, diagnostics, devops, etc.

In my experience, you pretty much learn this on the fly. You don't know how to do X, you google it, if you do X often enough, you'll eventually learn. After a while you end up mastering most of the unix suite (ls, grep, awk, du, etc..) so instead of googling stuff you write it. Unlike fundamentals (think books like SICP, Introduction to Algorithms, K&R, the Dragon book, et al), this is just a collection of useful com…

This is a great reply. "On the fly" is definitely my experience too. Needing to do something. Doing things slowly, inefficiently, with googling until you find or get told the more efficient way of doing things.

Also, talking with/demanding explanations/debating with geekier than thou friends has been really helpful with the bigger concepts.

Re: Devops/Sysadmin Cheatsheet

#86
post #5

For getting around linux I've found no better helpers than manpages and the cheatsheets by Peteris Krumins[1]. I notice this isn't offered as a pdf or image, is the idea that someone will come and visit the site when their server is in trouble? That said, I didn't know about some stuff here like scriptreplay -- thanks! [1]: http://www.catonmat.net/projects/cheat-sheets/

PDF is coming! And thanks for linking to catonmat, that stuff gets into some serious yummy detail.

Re: Devops/Sysadmin Cheatsheet

#87
post #85
post #81

Earlier quoted context omitted.

In my experience, you pretty much learn this on the fly. You don't know how to do X, you google it, if you do X often enough, you'll eventually learn. After a while you end up mastering most of the unix suite (ls, grep, awk, du, etc..) so instead of googling stuff you write it. Unlike fundamentals (think books like SICP, Introduction to Algorithms, K&R, the Dragon book, et al), this is just a collection of useful com…

This is a great reply. "On the fly" is definitely my experience too. Needing to do something. Doing things slowly, inefficiently, with googling until you find or get told the more efficient way of doing things. Also, talking with/demanding explanations/debating with geekier than thou friends has been really helpful with the bigger concepts.

Learning by doing is probably the way most people learn their unixcraft. It also helps if you have a friend or a team member who is a lot more experienced than you, a go-to guy with infinite patience to your stupid questions.

I had the privilege of working with a badass russian unix hacker for some time, he taught me how to do black magic with find, grep, sort and uniq.

Re: Devops/Sysadmin Cheatsheet

#88
post #9

I would warn anyone that read this to understand what each command does before actually running anything on a machine. Things like "sudo !!" are INCREDIBLY dangerous, and I would never put that on a cheat sheet.

So, what's wrong with sudo !! then?

It's too easy to have a sticky key and type sudo !1 by accident. As a rule, not a good idea to do sudo from history without examining it first. So do up arrow or CTRL-P and the edit the command.

Re: Devops/Sysadmin Cheatsheet

#89

Just a UX suggestion, but I would highlight the text on the input focus for easy copy/paste.

Good point. I considered doing this, but then it ends up being a "surprise" to users when they quickly go to triple-click (select all) and the interaction is different than expected.

What I find really useful is you can immediately type some characters to filter, and then tab to the command you want. It's automatically selected in that case.

I'll likely stick a "copy" button on hover shortly — had some initial problems with z-indexes (it uses flash) but this solves the "one click to copy" issue without affecting the default and expected interaction.

Post reply on HN