Most Popular
1500 questions
256
votes
11 answers
Is it bad to redirect http to https?
I just installed an SSL Certificate on my server.
It then set up a redirect for all traffic on my domain on Port 80 to redirect it to Port 443.
In other words, all my http://example.com traffic is now redirected to the appropriate…
JasonDavis
- 2,678
256
votes
10 answers
How to run a command multiple times, using bash shell?
Is there a way to run a command (e.g. ps aux|grep someprocess) for n times?
Something like:
run -n 10 'ps aux|grep someprocess'
I want to use it interactively.
Update: The reason I am asking this is, that I do work on a lot of machines and I don't…
mahatmanich
- 3,124
- 3
- 25
- 24
255
votes
4 answers
How can I see which flags Nginx was compiled with?
How can I check what modules have been added to an nginx installation?
Nisanio
- 2,713
251
votes
4 answers
What is the difference between Unix sockets and TCP/IP sockets?
It's from this answer:
When the host is "localhost", MySQL Unix clients use a Unix socket, AKA Unix Domain Socket, rather than a TCP/IP socket for the connection, thus the TCP port doesn't matter.
apache
- 3,547
- 7
- 29
- 25
249
votes
14 answers
What is this very short power cable called?
I have a couple of networking components in my rack that take giant AC adapters ("power bricks") that don't fit neatly into my rackmount PDU.
I have one "thingy" that is shown below, and I need to buy a few more. But I have no idea what I'm…
Portman
- 5,289
248
votes
11 answers
How to use Let's Encrypt DNS-01 challenge validation?
Let's Encrypt has announced they have:
Turned on support for the ACME DNS challenge
How do I make ./letsencrypt-auto generate a new certificate using DNS challenge domain validation?
EDIT
I mean: How do I avoid http/https port binding, by using…
Pierre Prinetti
- 2,615
246
votes
13 answers
Environment variables of a running process on Unix?
I need to troubleshoot some problems related to environment variables on a Unix system.
On Windows, I can use a tool such as ProcessExplorer to select particular a process and view values of each environment variable.
How can I accomplish the same…
Gant
- 2,605
246
votes
4 answers
How do I do 'mount --bind' in /etc/fstab?
I'm trying to add mount --bind /proc/ /chroot/mysql/proc to /etc/fstab. How can I do this?
Some Linux Nerd
- 3,597
246
votes
29 answers
Using DD for disk cloning
There's been a number of questions regarding disk cloning tools and dd has been suggested at least once. I've already considered using dd myself, mainly because ease of use, and that it's readily available on pretty much all bootable Linux…
falstro
- 2,875
245
votes
10 answers
How to install tzdata on a ubuntu docker image?
I have the following line in the Dockerfile.
RUN apt-get install -y tzdata
When I run it, it asks for my input. After I provided my input, it hung there. Does anybody know how to solve this problem?
Step 25/25 : RUN apt-get install -y tzdata
--->…
user1424739
- 2,619
245
votes
10 answers
How to tell which local branch is tracking which remote branch in Git?
I would like to know if there's a way to tell which local branch is tracking which remote branch in Git.
I'm using one remote server, which is named "origin".
PJ.
- 3,037
242
votes
3 answers
How can I override CMD when running a docker image?
I want to inspect a docker image created by someone else with both an entrypoint and cmd specified, for example:
ENTRYPOINT ["/usr/sbin/apache2ctl"]
CMD ["-D", "FOREGROUND"]
I currently do:
docker run --interactive --tty --entrypoint=/bin/bash…
warp
- 2,639
242
votes
7 answers
Nginx config reload without downtime
I use nginx as a reverse proxy.
Whenever I update the config for it using
sudo "cp -r #{nginx_config_path}* /etc/nginx/sites-enabled/"
sudo "kill -s HUP `cat /var/run/nginx.pid`"
I face a brief downtime. How can I avoid that?
Saurav Shah
- 2,535
241
votes
11 answers
"Add correct host key in known_hosts" / multiple ssh host keys per hostname?
Trying to ssh into a computer I control, I'm getting the familiar message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! …
Samuel Edwin Ward
- 2,593
241
votes
10 answers
How do I share a Git repository with multiple users on a machine?
I have a Git repository on a staging server which multiple developers need to be able to pull to. git-init seems to have a flag very close to what I'm looking for: --shared, except I'd like multiple people to pull to that repository, as well. The…
Andrey Fedorov
- 2,139