94
votes
24answers
29k 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 ...
94
votes
1answer
25k views

Create a public SSH key from the private key?

Let's suppose I have a SSH key, but I've deleted the public key part. I have the private key part. Is there some way I can regenerate the public key part?
94
votes
4answers
128k views

FreeBSD performance tuning. Sysctls, 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 ...
92
votes
15answers
78k 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 ...
92
votes
14answers
49k views

How do diff over ssh?

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

How do I select which Apache MPM to use?

I'm a little confused between the different MPMs offered by Apache - 'worker', 'event', 'prefork', etc. What are the major differences between them, and how can I decide which one will be best for a ...
92
votes
4answers
13k 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 ...
90
votes
1answer
5k 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 ...
90
votes
2answers
34k 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 ...
89
votes
2answers
31k views

How can I see which flags Nginx was compiled with?

How can I check what modules have been added to an nginx installation?
88
votes
6answers
27k 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?
87
votes
9answers
79k views

How to zip/unzip files in Powershell?

Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?
86
votes
8answers
144k 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 ...
85
votes
11answers
7k 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 ...
85
votes
7answers
63k 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 ...
85
votes
7answers
21k 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 ...
85
votes
2answers
144k 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 ...
84
votes
6answers
106k 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?
82
votes
15answers
90k 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 ...
82
votes
5answers
25k 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. ...
82
votes
3answers
37k 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
78
votes
8answers
171k 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 ...
77
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 ...
77
votes
10answers
230k views

What's the command-line utility in Windows to do a reverse DNS look-up?

Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like <toolname> w.x.y.z => mycomputername I've tried: nslookup: seems to be forward ...
77
votes
2answers
35k 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 ...
77
votes
6answers
16k 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 ...
77
votes
4answers
44k 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 ...
77
votes
5answers
199k 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 ...
77
votes
6answers
70k 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 ...
76
votes
16answers
8k views

How do I protect my company from my IT guy? [closed]

I'm going to hire an IT guy to help manage my office's computers and network. We're a small shop, so he'll be the only one doing IT. Of course, I'll interview carefully, check references, and run a ...
75
votes
6answers
501k views

What port does SFTP use?

Does SFTP use port 21 or port 22?
75
votes
4answers
13k 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 ...
74
votes
7answers
65k 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 ...
74
votes
8answers
32k 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. ...
73
votes
17answers
32k 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 ...
73
votes
10answers
134k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
73
votes
14answers
66k 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 ...
73
votes
4answers
74k 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 ...
73
votes
8answers
108k 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?
72
votes
9answers
97k 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)?
72
votes
6answers
14k 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 ...
71
votes
5answers
42k 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 ...
71
votes
19answers
15k views

Why should I firewall servers?

PLEASE NOTE: I'm not interested in making this into a flame war! I understand that many people have strongly-held beliefs about this subject, in no small part because they've put a lot of effort into ...
70
votes
12answers
15k views

Is Ping a reliable way to check if a server is available?

In my application I am pinging a server and waiting for a response. I am using this to determine whether the server is available and responsive or not. Is this a reliable way of determining ...
69
votes
11answers
9k views

How bad is it really to install Linux on one big partition?

We will be running CentOS 7 on our new server. We have 6 x 300GB drives in raid6 internal to the server. (Storage is largely external in the form of a 40TB raid box.) The internal volume comes to ...
69
votes
8answers
75k 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 ...
69
votes
5answers
42k views

How to change an EC2 instance's security group

I have created a new EC2 instance. It got assigned the default security group. I want to change that security group. How?
68
votes
8answers
46k views

How much network latency is “typical” for east - west coast USA?

At the moment we're trying to decide whether to move our datacenter from the west coast to the east coast. However, I am seeing some disturbing latency numbers from my west coast location to the east ...
68
votes
8answers
7k views

How to backup 20+TB of data?

We have a NAS server at the company I work for that is being used for storing photography sessions. Each session is approximately 100gb. Over the last couple of years this server has accumulated 10+ ...
68
votes
9answers
66k views

Dump Microsoft SQL Server database to an SQL script

Is there any way to export a Microsoft SQL Server database to an sql script? I'm looking for something which behaves similarly to mysqldump, taking a database name, and producing a single script ...

15 30 50 per page