Most Popular
1500 questions
245
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,595
- 2
- 16
- 8
243
votes
3 answers
How to include multiple domains in an spf TXT Record
I am looking to setup a TXT spf record that has 2 included domains... individually:
v=spf1 include:_spf.google.com ~all
and
v=spf1 include:otherdomain.com ~all
What is the proper way of combining them into a single item?

tgriesser
- 2,822
- 2
- 17
- 10
243
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,017
- 5
- 21
- 15
241
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,545
- 3
- 13
- 9
241
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
- 2,954
- 3
- 22
- 23
240
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,129
- 4
- 16
- 12
238
votes
7 answers
How to force or redirect to SSL in nginx?
I have a signup page on a subdomain like: https://signup.example.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 html/server block in nginx looks like this:
html {
server…

Callmeed
- 2,725
- 4
- 20
- 15
237
votes
16 answers
df in linux not showing correct free space after file removal
I have file servers which are used to store files. Files might reside there for a week, or for a year. Unfortunately, when I remove files from the server, df command doesn't reflect the freed up space. So eventually, the server gets filled up (df…
user11350
234
votes
4 answers
What's the best way of handling permissions for Apache 2's user www-data in /var/www?
Has anyone got a nice solution for handling files in /var/www? We're running Name Based Virtual Hosts and the Apache 2 user is www-data.
We've got two regular users & root. So when messing with files in /var/www, rather than having to...
chown -R…

Gareth
- 8,573
- 13
- 44
- 44
233
votes
4 answers
Symlink not updating as expected when using an absolute with relative path
I am trying to use symbolic links. I did some reading and found the following commands:
Creation -> ln -s {/path/to/file-name} {link-name}
Update -> ln -sfn {/path/to/file-name} {link-name}
Deletion -> rm {link-name}
Creations and deletions work…

Jérôme Verstrynge
- 4,787
- 7
- 24
- 35
232
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,735
- 3
- 18
- 10
232
votes
5 answers
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.
Currently, it's like this:
server {
listen 80;
…

ceejayoz
- 32,910
- 7
- 82
- 106
229
votes
19 answers
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 my /etc/hosts/ file?
If it's not possible, how do I work around this problem? I need to test wildcard sub-domains on my localserver. …

MikeN
- 8,442
- 5
- 23
- 18
228
votes
17 answers
Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
I have an instance of an application running in the cloud on an Amazon EC2 instance, and I need to connect to it from my local Ubuntu. It works fine on one local ubuntu and also laptop. I got this message, Permission denied (publickey)., when trying…

Vorleak Chy
- 2,421
- 2
- 15
- 8
227
votes
3 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,327
- 3
- 19
- 22