107
votes
14answers
58k views

How do diff over ssh?

How do I diff files/folders across machines provided that the only connectivity available is ssh?
105
votes
2answers
44k views

Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?

This may be a bit of a noobish question, but I was taking a look at /etc/hosts on my new Xubuntu install and saw this: 127.0.0.1 localhost 127.0.1.1 myhostname On most 'nixes I've used, the second ...
104
votes
23answers
10k views

How do you make it obvious you are on a production system?

A few of us at my company have root access on production servers. We are looking for a good way to make it exceedingly clear when we have ssh'd in. A few ideas we have had are: Bright red prompt ...
104
votes
16answers
91k views

How do you install Node.JS on CentOS?

I've found numerous installation instructions for Node.js but they all seem so complicated -- I'm not a super sys admin but I can get around. I have yum on the system, but I didn't find any node.js ...
103
votes
2answers
40k views

How can I see which flags Nginx was compiled with?

How can I check what modules have been added to an nginx installation?
102
votes
26answers
34k views

How do I prevent accidental rm -rf /*?

I just ran rm -rf /* accidentally, but I meant rm -rf ./* (notice the star after the slash). alias rm='rm -i' and --preserve-root by default didn't save me, so are there any automatic safeguards for ...
102
votes
5answers
5k views

How to cd into a directory with this name “-2” (starting with the hyphen)?

I have a directory named: -2 I want to cd into it but the cd complains: bash: cd: -2: invalid option With no success, I've tried: cd "-2" cd '-2' cd \-2 Any solution? Edit: no file browsers ...
102
votes
6answers
132k views

How can I find out what AD groups I'm a member of?

I'm running a Windows XP desktop in a corporate environment. How can I find out what AD groups I belong to?
101
votes
1answer
7k views

I am under DDoS. What can I do?

This is a Canonical Question about DoS and DDoS mitigation. I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all ...
100
votes
8answers
228k views

How to automate SSH login with password?

How to automate SSH login with password? I'm configuring my test VM, so heavy security is not considered. SSH chosen for acceptable security with minimal configuration. ex) echo password | ssh ...
100
votes
4answers
18k views

Should I quit using Ifconfig?

With the servers that mount Infiniband cards, when I use the ifconfig command, I get this warning: Ifconfig uses the ioctl access method to get the full address information, which limits hardware ...
100
votes
4answers
139k views

FreeBSD performance tuning: Sysctl parameter, loader.conf, kernel

I wanted to share knowledge of tuning FreeBSD via sysctl.conf / loader.conf / KENCONF / etc. It was initially based on Igor Sysoev's (author of nginx) presentation about FreeBSD tuning up to ...
99
votes
9answers
7k views

Can you mount a network switch upside down?

We just took delivery of a new Avaya 2500 48-port switch, that has 24 PoE ports. The problem is that all the PoE ports are on the left-hand size of the switch, and our PoE device cables can only reach ...
99
votes
7answers
85k views

How to force or redirect to SSL in nginx?

I have a signup page on a subdomain like: https://signup.mysite.com It should only be accessible via HTTPS but I'm worried people might somehow stumble upon it via HTTP and get a 404. My ...
99
votes
15answers
110k views

Copying a large directory tree locally? cp or rsync?

I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp. I'm worried about permissions ...
95
votes
4answers
99k views

What's the difference between ip address 0.0.0.0 and 127.0.0.1?

I do know that 127.0.0.1 ~ 127.255.255.254 are the loopback IP addresses for most modern operating systems and we could use these IP addresses to refer to our own computer. But what's 0.0.0.0? It ...
94
votes
2answers
164k views

What is Active Directory Domain Services and how does it work?

This is a Canonical Question about Active Directory Domain Services (AD DS). What is Active Directory? What does it do and how does it work? How is Active Directory organized: Forest, Child ...
93
votes
10answers
91k views

How to zip/unzip files in Powershell?

Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?
93
votes
9answers
166k views

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I ...
92
votes
7answers
23k views

How does CTRL-ALT-DEL to log in make Windows more secure?

When logging into Windows, it says on that page that CTRL-ALT-DEL somehow makes Windows more secure. I have never been able to figure a mechanism where having to press some specific key combination ...
90
votes
11answers
8k views

Cooling Server Closet - No A/C Is Possible

We're moving into a new office in an old building in London (that's England :) and are walling off a 2m x 1.3m area where the router & telephone equipment currently terminates to use as a server ...
90
votes
5answers
34k views

nginx HTTPS serving with same config as HTTP

Is there a way to share configuration directives across two nginx server {} blocks? I'd like to avoid duplicating the rules, as my site's HTTPS and HTTP content are served with the exact same config. ...
90
votes
4answers
54k views

Moving an already-running process to Screen

My office job routinely sees me connected to a Linux box via VNC. Sometimes I start a remote job on the console, and realize later that it runs much longer than expected. (Should have started that ...
90
votes
6answers
29k views

SSH keypair generation: RSA or DSA?

SSH supports two signature algorithms for key pairs: RSA and DSA. Which is preferred, if any? For RSA, what is the minimum acceptable key length?
90
votes
4answers
42k views

What's the difference between authorized_keys and authorized_keys2?

Just wanted a quick summary of the differences between them and why there are two? Cheers
89
votes
8answers
77k views

How can I run Debian stable but install some packages from testing?

Say you're running a server and you don't want to upgrade to Testing (Squeeze) from Stable (Lenny) to just install a required package or two. What's the best way of installing only certain packages ...
89
votes
14answers
78k views

In my /etc/hosts/ file on Linux/OSX how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to m /etc/hosts/ file? If it's not possible, how do I work around this problem? I need ...
89
votes
7answers
94k views

Setting the hostname: FQDN or short name?

I've noticed that the "preferred" method of setting the system hostname is fundamentally different between Red Hat/CentOS and Debian/Ubuntu systems. CentOS documentation and the RHEL deployment guide ...
85
votes
10answers
156k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
85
votes
2answers
39k views

IPTABLES - Limit rate of a specific incoming IP

I do not wish to limit the rate of a specific service. My goals is to limit rate based solely on the incoming IP address. For example using a pseudo-rule: john.domain.local (192.168.1.100) can only ...
85
votes
6answers
19k views

Why is Enterprise Storage so expensive?

This is a Canonical Question about the Cost of Enterprise Storage. See also the following question: What's the best way to explain storage issues to developers and other users ...
83
votes
9answers
117k views

How do I get current Unix time in milliseconds using bash?

How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
83
votes
8answers
120k views

How do I create a symbolic link in Windows?

Windows Vista added the ability to create symbolic links to files and directories. How do I create a symbolic link and what are the current consumer and server versions of Windows that support it?
82
votes
6answers
575k views

What port does SFTP use?

Does SFTP use port 21 or port 22?
82
votes
4answers
89k views

how to download the ssl certificate from a website?

I want to download the ssl certificate from, say https://www.google.com, using wget or any other commands. Any unix command line? wget or openssl?
82
votes
7answers
18k views

How can the little guys effectively learn and use Puppet?

Six months ago, in our not-for-profit project we decided to start migrating our system management to a Puppet-controlled environment because we are expecting our number of servers to grow ...
82
votes
5answers
221k views

Does Windows have a built-in ZIP command for the command line?

Since Windows Explorer (since at least Windows XP) has some basic support for ZIP files, it seems like there should be a command-line equivalent, but I can't seem to find any sign of one. Does ...
81
votes
5answers
48k views

Multiple SSL domains on the same IP address and same port?

This is a Canonical Question about Hosting multiple SSL websites on the same IP. I was under the impression that each SSL Certificate required it's own unique IP Address/Port combination. But the ...
80
votes
9answers
41k views

Environment variables of a running process on Unix?

This is to troubleshoot some problems related to environment variables .. On Windows, I could do this by using tool such as ProcessExplorer to select particular process and view values of each ...
80
votes
9answers
89k views

When does `cron.daily` run?

When do entries in cron.daily (and .weekly and .hourly) run, and is it configurable? I haven't found a definitive answer to this, and am hoping there is one. I'm running RHEL5 and CentOS 4, but for ...
79
votes
12answers
9k views

Transfer 10TB of files from USA -> UK datacenter

I am migrating my server from the USA to the UK from one data center to another, my host said I should be able to achieve 11 megabytes per second. Operating system is Windows Server 2008 at both ...
79
votes
5answers
117k views

How do you add a Windows environment variable without rebooting?

This is probably an easy answer, but I have never been able to find it by googling. I simply would like to add an Environment variable to a Windows machine (desktop or server) and be able to use it ...
79
votes
1answer
54k views

What is a challenge password?

I'm setting up SSL on an Ubuntu server. One of fields it asks for as part of setting up the CSR is a "challenge password". What is that? The default is blank. Do I need to enter one?
77
votes
13answers
82k views

How to reconnect to a disconnected ssh session

Is there a way to connect to an ssh session that was disconnected? We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we ...
77
votes
17answers
54k views

How can I get the size of an Amazon S3 bucket?

I'd like to graph the size (in bytes, and # of items) of an Amazon S3 bucket and am looking for an efficient way to get the data. The s3cmd tools provide a way to get the total file size using s3cmd ...
77
votes
8answers
83k views

how to set global PATH on OS X?

I'd like to append to the global PATH variable on OS X so that all user shells and GUI applications get the same PATH environment. I know I can append to the path in shell startup scripts, but those ...
77
votes
8answers
36k views

Heartbleed: how to reliably and portably check the OpenSSL version?

I was looking at a reliable and portable way to check the OpenSSL version on GNU/Linux and other systems, so users can easily discover if they should upgrade their SSL because of the Heartbleed bug. ...
77
votes
4answers
14k views

Why is TCP accept() performance so bad under Xen?

The rate at which my server can accept() new incoming TCP connections is really bad under Xen. The same test on bare metal hardware shows 3-5x speed ups. How come this is so bad under Xen? Can you ...
76
votes
17answers
39k views

Should network hardware be set to “autonegotiate” speeds or fixed speeds?

We recently had a little problem with networking where multiple servers would intermittently lose network connectivity in a fairly painful-to-resolve way (required hard reboot). This has been going on ...
76
votes
7answers
61k views

Can anyone explain precisely what IOWait is?

As much as I have read about iowait, it is still mystery to me. I know it's the time spent by the CPU waiting for a IO operations to complete, but what kind of IO operations precisely? What I am also ...

15 30 50 per page