Linux Admin Tips, Tricks and Tools of the Trade
Feb 28, 2013 5:00 AM PT
Here in the Linux community, most of us enjoy high-level debates about strategies and trends just as much as the next technology enthusiast does.
At the end of the day, however, it seems safe to say that what we tend to relish most of all is a good ol' nuts-and-bolts discussion of the tools and tricks of the trade.
So it was with great enthusiasm that Linux fans came upon a recent article in The Register entitled, "Which Linux admin tools and tricks would YOU stake your career on?"
'Let's Make a Grand List'
"Over the years I've talked about some of the tools that make Linux easier for me," wrote author Trevor Pott. "Today I am making an appeal to El Reg's esteemed commentards: in the forums, please list your favourite resources for Linux noobs.
"What forums, IRC channels, wikis, manpage repositories, configuration tools and so forth have made your lives easier?" Pott asked. "Let's put our heads together and make a grand list. Maybe together we can help the signal overcome the noise."
Now, residents of the Linux blogosphere will surely be forgiven if they were among those who mistakenly filed earthquake reports, so loud were the thundering hooves of those who galloped forth to share their own suggestions.
'Read the Man Pages'
"Become familiar with regex and save yourself some time and frustration," wrote Chris N. in The Register's forums, for example,even including a link to "an excellent gentle intro to this seemingly hard subject."
Alternatively, "Rule #1: Read the man pages. Rule #2: Read the man pages," offered Steve Button. "This is SO key, but many newbies miss this. You should have man pages installed by default, and this is your best resource."
Then again, "for troubleshooting networking issues there's nothing like a good tcpdump on a server imported into wireshark on a desktop for ease of viewing," suggested kbb.
In no time at all the topic spread like the proverbial wildfire to Linux Girl's hangout-du-jour, the blogosphere's seedy Punchy Penguin Saloon.
She whipped out her Quick Quotes Quill and took down as much as she could.
The Beauty of Bash
"Bash scripting and SSH will do just about anything we need done to any number of computers," began blogger Robert Pogson.
"The example given in TFA is trivial," Pogson added, referring to Pott's description of problems that arise when junior admins try to clone CentOS virtual machines. "Just delete the persistent rules and be done with it before shutting down the model system. The MAC address can be specified on the command to start the copied machines. Create a directory of files named after the MAC addresses and you are good to go.
"You can make human-readable link-names to those for all the user-friendliness you need," Pogson went on. "You can put in that directory any other details you need for a particular machine, like its name or what you want the machine to do. Another script in the machine takes the list of details via scp and does its thing. Simple. ... or you can just use LDAP and DHCP to tell the client all it needs to know."
Bottom line: "Want a fancy GUI-tool? Be prepared to spend a lot of time scrolling or searching to do what a simple loop in a Bash script will do," he concluded.
'You Can Build Your Dreams'
"One of the more unusual sets of tools I am working with right now is basically a conglomeration of PostgreSQL, SSH, and shell scripting," offered Chris Travers, a blogger who works on the LedgerSMB project.
"One of the unusual things you can do with PostgreSQL is you can pass notifications on to listening processes," Travers explained. "In this way you can enter information into the database, and on commit it can trigger changes elsewhere on a near-real-time basis.
"Those changes are likely to include, in our case, anything from cloning virtual machines to modifying firewalls on some or all machines, to reconfiguring various pieces of software," he noted. "All the rest of this is done with some lightweight Perl and Bash scripting, and it actually sounds far more complex than it is."
By way of advice for those just starting out, "the key message I would give those who are looking at Linux or BSD instead of Windows is that although there is a bit of a learning curve with these operating systems, it is possible to start relatively small, and it is far easier to do anything reasonably advanced on Linux or BSD than it is on Windows," Travers concluded.
Not only that, but "as you get better, chances are that the small command line tools you start with will be used in ways you never thought possible," he added. "On these systems you can build your dreams."
'Too Much of a Chaotic Mess'
Last but not least, Slashdot blogger hairyfeet had a very different view.
"The situation with the DEs and sound subsystem have turned me right off using Linux with home and SMB customers, and that is where my bread and butter lies," hairyfeet said.
"I used to use Linux liveCDs for repair, but I was handed a FreeDOS-based disc filled with low-level diagnostic testing software a couple years back and haven't needed the LiveCDs -- which is just as well, as the last one I tried booting only had VESA for graphics and didn't like Realtek sound," he explained.
"As far as Linux as an OS goes, it's just too much of a chaotic mess right now, too many things getting thrown out or broken," hairyfeet concluded. "Maybe in another decade things will settle down, but if the market keeps heading in its current direction, all we will have is glorified game consoles that will only run corporate-approved software, so it's not like we'll have to worry about it."