Most Popular
1500 questions
338
votes
4 answers
What are the functional differences between .profile .bash_profile and .bashrc
What are the functional differences between the .profile, .bash_profile and .bashrc files?

lollercoaster
- 3,545
- 5
- 18
- 10
336
votes
18 answers
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 and uid/gid, since they have to be preserved in the…

Amandasaurus
- 31,471
- 65
- 192
- 253
334
votes
5 answers
How to send ctrl+alt+del using Remote Desktop?
How can I send ctrl+alt+del to a remote computer over Remote Desktop?
For example, if I wanted to change the local admin password on a remote PC using a Remote Desktop connection, it would be helpful to be able to send the ctrl+alt+del key sequence…

T. Marshall
- 3,443
- 2
- 17
- 8
334
votes
26 answers
Can I automatically add a new host to known_hosts?
Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh. The virtual machines will have previously unused hostnames and IP…

gareth_bowles
- 9,127
- 9
- 34
- 42
318
votes
27 answers
100% uptime for a web application
We received an interesting "requirement" from a client today.
They want 100% uptime with off-site failover on a web application. From our web application's viewpoint, this isn't an issue. It was designed to be able to scale out across multiple…

NotMe
- 3,772
- 7
- 31
- 43
310
votes
8 answers
How to bind MySQL server to more than one IP address?
Is there a secret way to bind MySQL to more than one IP address?
As far as I can see the bind-address parameter in the my.cnf does not support more than one IP and you can't have it more than once.

BlaM
- 3,886
- 5
- 27
- 28
308
votes
5 answers
Nginx reverse proxy + URL rewrite
Nginx is running on port 80, and I'm using it to reverse proxy URLs with path /foo to port 3200 this way:
location /foo {
proxy_pass http://localhost:3200;
proxy_redirect off;
proxy_set_header …

jeffreyveon
- 3,245
- 3
- 15
- 7
307
votes
2 answers
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?

Amandasaurus
- 31,471
- 65
- 192
- 253
306
votes
14 answers
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 w.x.y.z => mycomputername
I've tried:
nslookup: seems to be forward look-up only.
host: doesn't exist
dig: also doesn't exist.
I…

alastairs
- 3,195
- 3
- 19
- 11
300
votes
4 answers
How do I select which Apache MPM to use?
This is a Canonical Question about selecting the right Apache httpd MPM.
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…

Tiffany Walker
- 6,681
- 14
- 56
- 82
294
votes
8 answers
Check if port is open or closed on a Linux server?
How can I check if a port is listening on a Linux server?

James Anderson
- 3,107
- 2
- 17
- 12
291
votes
16 answers
How to Unban an IP properly with Fail2Ban
I'm using Fail2Ban on a server and I'm wondering how to unban an IP properly.
I know I can work with IPTables directly: iptables -D fail2ban-ssh
But is there not a way to do it with the fail2ban-client?
In the manuals it states something…

psp
- 3,173
- 3
- 15
- 14
287
votes
4 answers
Why do I need Nginx and something like Gunicorn?
I'm looking for an overly simplified answer to the following question. I'm trying to build a foundational understanding of how Nginx works alongside something like Gunicorn.
Do I need both Nginx and something like Gunicorn to deploy Django apps on…

a.m.
- 2,975
- 3
- 14
- 6
284
votes
5 answers
What's the difference between IP address 0.0.0.0 and 127.0.0.1?
I know that 127.0.0.1 ~ 127.255.255.254 are the loopback IP addresses for most modern operating systems, and these IP addresses can be used to refer to our own computer.
But what's 0.0.0.0? It seems it also refers to the local computer, so what's…

Jichao
- 3,037
- 4
- 18
- 14
284
votes
5 answers
Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About mod_rewrite Rules but Were Afraid to Ask
This is a Canonical Question about Apache's mod_rewrite.
Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:
Changing HTTP to HTTPS (or the…

Kyle Brandt
- 83,619
- 74
- 305
- 448