Most Popular

1500 questions
105
votes
4 answers

How to reload screenrc without restarting screen?

After modified screenrc, how to see the changes without restarting screen?
garconcn
  • 2,438
105
votes
8 answers

How to determine JAVA_HOME on Debian/Ubuntu?

On Ubuntu it is possible to have multiple JVMs at the same time. The default one is selected with update-alternatives. But this does not set the JAVA_HOME environment variable, due to a debian policy. I am writing a launcher script (bash), which…
Witek
  • 1,422
105
votes
2 answers

How to make PuTTY settings persistent?

Some PuTTY settings are valid only for the current session, and when I start it again, they are at the default value again. How can I change the default values?
Jader Dias
  • 4,785
104
votes
3 answers

Adding a user to an additional group using ansible

How can I add a user to additional groups with Ansible? For example, I would like to add a user to the sudo group without replacing the user's existing set of groups.
vdboor
  • 3,940
104
votes
17 answers

CentOS vs. Ubuntu

I had a web server that ran Ubuntu, but the hard drive failed recently and everything was erased. I decided to try CentOS on the machine instead of Ubuntu, since it's based on Red Hat. That association meant a lot to me because Red Hat is a…
DLH
  • 1,115
104
votes
2 answers

How can I connect to a Windows server using a Command Line Interface? (CLI)

Especially with the option to install Server Core in Server 2008 and above, connecting to Windows servers over a CLI is increasingly useful ability, if not one that's very widespread amongst Windows administrators. Practically every Windows GUI…
104
votes
6 answers

What range of MAC addresses can I safely use for my virtual machines?

I want to assign my virtual machines MAC addresses so that I can configure DHCP reservations for them so that they always get the same IP address regardless of which host hypervisor they are running on or operating system they are running. What I…
104
votes
9 answers

How to add a security group to a running EC2 Instance?

I have an Amazon EC2 instance running and I will like to add another security group to that instance and then remove the current security group from that instance. Is this possible?
Geo
  • 3,101
104
votes
3 answers

How to get the url of the current svn repo?

I have 2 svn checkouts that someone setup for me. Now I need to check these same files on another computer, but since I didn't check them out initially I don't know the urls to use when running the svn checkout command: svn co WHAT_GOES_HERE? Since…
Manny
  • 1,043
104
votes
11 answers

Windows server last reboot time

How can I find a Windows server's last reboot time, apart from 'net statistics server/workstation'?
Sakthi
104
votes
4 answers

Difference between `curl -I` and `curl -X HEAD`

I was watching the funny server type from http://www.reddit.com with curl -I http://www.reddit.com when I guessed that curl -X HEAD http://www.reddit.com would do the same. But, in fact, it doesn't. I'm curious about why. This is what I observe…
chmeee
  • 7,548
104
votes
6 answers

Adding a directory to $PATH in CentOS?

We just got our new server(s) up and we're running CentOS on them all. After successfully installing Ruby Enterprise Edition, I would now like to add the REE /bin (located at /usr/lib/ruby-enterprise/bin) directory to make it the default Ruby…
vonconrad
  • 1,291
103
votes
3 answers

Should I install Linux applications in /var or /opt?

I run a lot of open source applications including java and tomcat. It seems like most instructions have my applications running from the /var directory. But every once in a while, I also see the /opt directory. While I'm at it, I also see…
103
votes
6 answers

SSHFS mount that survives disconnect

I'm using SSHFS mounts from my laptop to a central server. Obviously, the SSHFS mount is broken after a longer disconnect (eg. during suspend), cause the underlying SSH connection timed out. Is there a way to get SSHFS mounts surviving long lasting…
bene
  • 2,363
103
votes
13 answers

Ansible: Execute task only when a tag is specified

Ansible tags can be used to run only a subset of tasks/roles. This means that by default all tasks are executed and we can only prevent some tasks to execute. Can we limit a task to be exectued only when "foo" tag is specified? Can we use current…