Use this tag for asking about programs you have written to perform system-administration tasks. Non-programming questions about system administration are off-topic for Stack Overflow and should not be asked here.
Questions tagged [system-administration]
983 questions
1404
votes
24 answers
How to use SSH to run a local shell script on a remote machine?
I have to run a local shell script (windows/Linux) on a remote machine.
I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B.
The local and remote computers can be…
Arun
539
votes
14 answers
How can I delete a service in Windows?
I have a couple old services that I want to completely uninstall. How can I do this?

sgwill
- 9,814
- 8
- 35
- 40
283
votes
5 answers
How to find out what group a given user has?
In Unix/Linux, how do you find out what group a given user is in via command line?

Alex Argo
- 8,920
- 12
- 43
- 46
278
votes
3 answers
Crontab Day of the Week syntax
In crontab does the Day of the Week field run from 0 - 6 or 1 -7?
I am seeing conflicting information on this. wikipedia states 0-6 and other sites I have seen are 1-7.
Also what would be the implication or either using 0 or 7 incorrectly? i.e.…

Marty Wallace
- 34,046
- 53
- 137
- 200
239
votes
13 answers
Map a network drive to be used by a service
Suppose some Windows service uses code that wants mapped network drives and no UNC paths. How can I make the drive mapping available to the service's session when the service is started? Logging in as the service user and creating a persistent…

VoidPointer
- 17,651
- 15
- 54
- 58
196
votes
9 answers
Locate the nginx.conf file my nginx is actually using
Working on a client's server where there are two different versions of nginx installed. I think one of them was installed with the brew package manager (its an osx box) and the other seems to have been compiled and installed with the nginx packaged…

rgb
- 3,144
- 3
- 17
- 26
194
votes
19 answers
How do I extract the contents of an rpm?
I have an rpm and I want to treat it like a tarball. I want to extract the contents into a directory so I can inspect the contents. I am familiar with the querying commands of an uninstalled package. I do not simply want a list of the contents of…

Jeff Sheffield
- 5,768
- 3
- 25
- 32
183
votes
16 answers
Tracking CPU and Memory usage per process
I suspect that one of my applications eats more CPU cycles than I want it to. The problem is - it happens in bursts, and just looking at the task manager doesn't help me as it shows immediate usage only.
Is there a way (on Windows) to track the…

Eli Bendersky
- 263,248
- 89
- 350
- 412
142
votes
8 answers
Best practice to run Linux service as a different user
Services default to starting as root at boot time on my RHEL box. If I recall correctly, the same is true for other Linux distros which use the init scripts in /etc/init.d.
What do you think is the best way to instead have the processes run as a…

James Brady
- 27,032
- 8
- 51
- 59
126
votes
7 answers
What Process is using all of my disk IO
If I use "top" I can see what CPU is busy and what process is using all of my CPU.
If I use "iostat -x" I can see what drive is busy.
But how do I see what process is using all of the drive's throughput?
Party King
112
votes
10 answers
Calling JMX MBean method from a shell script
Are there any libraries that would allow me to call a JMX MBean method from a shell script. We expose some operations/admin commands through JMX, and we could have our admins use JConsole, or VisualVM, but some tasks are better left to automation.…

Dougnukem
- 14,709
- 24
- 89
- 130
108
votes
6 answers
lsof survival guide
lsof is an increadibly powerful command-line utility for unix systems. It lists open files, displaying information about them. And since most everything is a file on unix systems, lsof can give sysadmins a ton of useful diagnostic data.
What are…

Hans Sjunnesson
- 21,745
- 17
- 54
- 63
97
votes
13 answers
How do I daemonize an arbitrary script in unix?
I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon.
There are two common cases I'd like to deal with:
I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever…

dreeves
- 26,430
- 45
- 154
- 229
68
votes
3 answers
How do I add a user in Ubuntu?
Specifically, what commands do I run from the terminal?

quackingduck
- 5,845
- 5
- 29
- 22
65
votes
7 answers
How is it possible that kill -9 for a process on Linux has no effect?
I'm writing a plugin to highlight text strings automatically as you visit a web site. It's like the highlight search results but automatic and for many words; it could be used for people with allergies to make words really stand out, for example,…

Aaron Digulla
- 321,842
- 108
- 597
- 820