News for hackers. Stuff that matters.
Re:In defense of PowerShell by nailer on Monday August 24, 2015 @06:14PM (#10113207)
As a Unix person, 'Restart-Service' seems a lot easier to remember than 'systemctl'.

Edit: Restart-Service is also easier to remember than /etc/init.d was.

Edit 2 (rate limit): `service` on RHEL is great, but it's a Red Hat-ism. Which is fine, I used to work at Red Hat, but still.

It's also pretty limited: you use service to start/stop/restart, but you still use systemctl to list services, or list /etc/init.d (technically /etc/rc.d/init.d on RHEL) on older boxes.

On Windows, to get services, it's `get-service`

Fun exercise for readers, given that you now know `restart-service` and `get-service`:

- Guess what the powershell command to get processes is.

- Guess what the powershell command to stop a process is.

- Guess what the Powershell command to install a package is.

There's some weird ones - dmidecode on Linux becomes get-wmiobject on Powershell (see the rosetta stone link posted earlier) - but for the most part it makes more sense than Linux and Unix.

Re:In defense of PowerShell by tokenizerrr on Monday August 24, 2015 @06:18PM (#10113224)
What about service apache2 restart
Re:In defense of PowerShell by yellowapple on Monday August 24, 2015 @06:42PM (#10113326)
Or /etc/rc.d/apache2 restart, as one would find in the BSD world (and Slackware, with a bit of modification).

This isn't to mention that it should be relatively trivial to map "restart-service $foo" to "/etc/rc.d/$foo restart" or "systemctl $foo.service restart" or whatever if one so chooses.

Re:In defense of PowerShell by bbatha on Tuesday August 25, 2015 @09:34AM (#10116303)
FreeBSD uses the service command these days too.
Re:In defense of PowerShell by yellowapple on Tuesday August 25, 2015 @03:09PM (#10118809)
Good to know. In that case, "BSD Land minus FreeBSD and possibly its descendants".
Re:In defense of PowerShell by nailer on Tuesday August 25, 2015 @05:04AM (#10115255)
Sure you could write functions or aliases to everything to give them more predictable names. But you shouldn't have to.
Re:In defense of PowerShell by vezzy-fnord on Monday August 24, 2015 @06:17PM (#10113215)
It's not like 'systemctl' is the only game in town, though.
Re:In defense of PowerShell by itaibn on Monday August 24, 2015 @06:30PM (#10113275)
You say that as if that makes remembering things easier.
Re:In defense of PowerShell by tokenizerrr on Tuesday August 25, 2015 @05:42AM (#10115361)
Regarding your edit: service works just fine on ubuntu as well
Re:In defense of PowerShell by tokenizerrr on Tuesday August 25, 2015 @10:04AM (#10116519)
As do stop, start, and restart (as long as you have /sbin on your path)
Re:In defense of PowerShell by mcguire on Monday August 24, 2015 @06:49PM (#10113358)
Restart-Service:Windows :: service:RHEL ?