• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Which scripting language to learn for Linux Administration

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Which scripting language to learn for Linux Administration? Python, Ruby, Perl, or PHP?

Thanks

 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm no Linux admin, but I'd have thought the place to start would be with Linux shell scripting with "bash"?

Not sure how far you can use Ruby for operating system admin tasks, and PHP is only useful for web applications. Python is a nice (OO) scripting language with a lot of library support for operating system tasks, and I think Perl offers a lot of system functionality but is also a lot harder to learn.

But you should start with Linux shell scripting, firstly because that's what it's for, and secondly because you will probably be able to find lots of sample scripts on the web to do common administrative tasks.

 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shell is an absolute "must know".

You should also be familiar with the differences between bash (which has all the bells and whistles, but is Linux specific) and the Korn shell (universal to just about all *nix OS's, a subset of bash).

Second scripting language? A toss-up between Perl and Python. "Python" is a toss-up between Python 2 (currently the most prevalent) and Python 3.

Ruby is a good language; it's popular with "Ruby-on-Rails" web applications. Similarly, PHP is most commonly used in PHP web apps.

IMHO .. PSM
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with the comments above - learn shell scripting first.

chris webster wrote:... and PHP is only useful for web applications

PHP works quite well from the command line, and you can do admin work with it. However I don't know of any admins who grab it as their tool of choice.

Paul Santa Maria wrote:... bash (which has all the bells and whistles, but is Linux specific)

GNU Bash is the shell used by default in Linux systems, but it is GNU software, not Linux specific software. It is also the default shell on a number of other operating systems, including Macintosh OS. For what it is worth, I don't remember an OS that I have used in the last 10 years that I have not used Bash on (including Windows 95, NT, 2000, XP; AIX, HPUX, VOS, FTX, ...)

Personally I use awk for a lot of my scripting, simply because when I first started using Unix systems, awk was always installed, but Perl was not guaranteed. Plus it is very C like. However if I were to start over, I would learn shell scripting first, then learn Perl.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic