Most Popular

1500 questions
326
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,425
  • 5
  • 17
  • 10
321
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,313
  • 2
  • 16
  • 8
321
votes
6 answers

How to set environment variable in systemd service?

I have an Arch Linux system with systemd and I've created my own service. The configuration service at /etc/systemd/system/myservice.service looks like this: [Unit] Description=My…
lfagundes
  • 3,313
  • 2
  • 13
  • 6
319
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
  • 30
  • 43
319
votes
24 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
  • 8,867
  • 9
  • 33
  • 42
305
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,816
  • 5
  • 26
  • 27
299
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…
292
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,541
  • 13
  • 53
  • 77
282
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
  • 2,985
  • 3
  • 14
  • 7
281
votes
160 answers

Useful Command-line Commands on Windows

The aim for this Wiki is to promote using a command to open up commonly used applications without having to go through many mouse clicks - thus saving time on monitoring and troubleshooting Windows machines. Answer entries need to…
dance2die
  • 1,961
  • 7
  • 31
  • 40
281
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,915
  • 3
  • 13
  • 6
281
votes
13 answers

Can I nohup/screen an already-started process?

I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in screen. Is there any way to "retroactively" nohup a…
ojrac
  • 2,913
  • 3
  • 17
  • 5
281
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
  • 82,107
  • 71
  • 302
  • 444
278
votes
45 answers

What are the obstacles to providing reliable Internet access and Wi-Fi at large tech conferences?

Every tech conference I've ever been to, and I've been to a lot, has had absolutely abysmal Wi-Fi and Internet access. Sometimes it's the DHCP server running out of addresses. Sometimes the backhaul is clearly inadequate. Sometimes there's one…
Joel Spolsky
  • 3,686
  • 4
  • 21
  • 19
278
votes
7 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
  • 2,947
  • 2
  • 16
  • 12