225
votes
How to view all ssl certificates in a bundle?
http://comments.gmane.org/gmane.comp.encryption.openssl.user/43587 suggests this one-liner:
openssl crl2pkcs7 -nocrl -certfile CHAINED.pem | openssl pkcs7 -print_certs -text -noout
It indeed worked ...
Community wiki
149
votes
Accepted
How do I auto-start docker containers at system boot?
Apparently, the current method to auto-start Docker containers (from Docker 1.2) is to use restart policies. This will control how Docker should handle starting of the container upon startup and re-...
117
votes
dpkg-reconfigure: unable to re-open stdin: No file or directory
I got the error message to go away by putting the following in my provisioning script, prior to any apt-get calls:
export DEBIAN_FRONTEND=noninteractive
This makes debconf use a frontend that ...
104
votes
Apache2 config variable is not defined
Source your envvars by running it like this:
source /etc/apache2/envvars
and then
/usr/sbin/apache2 -V
You should get:
el@apollo:/home/el$ apache2 -V
Server version: Apache/2.4.7 (Ubuntu)
Server ...
104
votes
Accepted
Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?
You can use Docker Desktop for Windows as the engine and Docker for Linux as the client in WSL on Ubuntu / Debian on Windows. Connect them via TCP.
Install Docker Desktop for Windows: https://hub....
103
votes
How can I check /dev/xvda1?
For our ec2 ubuntu instance, the above answers did not work completely.
On Ubuntu, by default, the check is not enabled in the rcS file. So
Edit rcS file
sudo vi /etc/default/rcS
below the line
#...
90
votes
Command line program to test DHCP service
Based on this answer, assuming you have installed nmap (sudo apt install nmap):
sudo nmap --script broadcast-dhcp-discover
Add the -e $interface option if you have more than one network interface. (...
90
votes
Accepted
How do I get apt-get to ignore some dependencies?
Simple and easy solution: just specify the unwanted packages with an extra - after each of them.
Example without the - switch:
root@debian:~# apt-get install bsd-mailx
Reading package lists... Done
...
88
votes
Accepted
What does -qq argument for apt-get mean?
The -qq is a flag to apt-get to make it less noisy.
-qq No output except for errors
You are correct about the >/dev/null. By redirecting all the STDOUT, the -qq becomes redundant.
86
votes
Accepted
Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host
Woo, I found a post on github that solved my problem.
After Steve K. pointed out that it wasn't actually a DNS issue and was a connectivity issue, I was able to find a post on github that described ...
75
votes
Accepted
debian packages version convention
The Debian Policy Manual has this to say about the version field, which answers some parts of your question:
Format
The format is: [epoch:]upstream_version[-debian_revision]
The three ...
73
votes
Amazon Linux vs. Ubuntu for Amazon EC2
Amazon Linux is a rolling distro, like Fedora, or Debian Testing (sort of). In my view it is not suitable for any production product whatsoever. I'm surprised more people do not realize this. This ...
73
votes
Accepted
Straight forward way to run ssh-agent and ssh-add on login via SSH?
You can try adding this:
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
This way the ssh-agent does not start a new shell, it just launches itself in the background and spits out the shell commands to ...
62
votes
Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
I would like to add to the previous answers that the most important is not how you call the directories (though that is a very useful convention), but what you actually put in nginx.conf. Example ...
61
votes
Locked out of my own server: getting "Too many authentication failures" right away when connecting via ssh
This error usually means that you’ve got too many keys loaded in your ssh-agent.
Explanation: Your ssh client will attempt to use all the keys from ssh-agent one by one before it gets to use the key ...
59
votes
How do you set a locale non-interactively on Debian/Ubuntu?
Could not get @stone's answer to work. Instead, I use this method (for Dockerfiles):
# Configure timezone and locale
echo "Europe/Oslo" > /etc/timezone && \
dpkg-reconfigure -f ...
59
votes
Accepted
Can't enter the letter 'e' over ssh
My problem is not the same as can't type lower cased e in amazon ec2 (Amazon Linux), but similar.
After checking /etc/inputrc and finding nothing out of the ordinary, I remembered that I did do ...
58
votes
Accepted
What is the difference between PV and HVM virtualization types in ec2?
Amazon run on Xen, which provides Para-virtualization (PV) or Hardware-assisted virtualization (HVM).
Para-virtualization used to be the recommended choice, as it gave you better performance (with a ...
57
votes
UFW Firewall Rules ordering?
If you're interested in reordering your UFW rules, this is one way to do it.
$ sudo ufw status numbered
To Action From
-- ------ --...
57
votes
Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
What's Going On?
You must be using Debian or Ubuntu, since the evil sites-available / sites-enabled logic is not used by the upstream packaging of nginx from http://nginx.org/packages/.
In either case,...
54
votes
Deleting All Partitions From the Command Line
The wipefs program lets you easily delete the partition-table signature:
wipefs -a /dev/sda
From man wipefs
wipefs can erase filesystem, raid or partition-table signatures (magic
strings) from ...
54
votes
Accepted
How do I find out where the web site's code resides?
First of all you should check what websites are hosted on the server
# apachectl -t -D DUMP_VHOSTS
Then when you will find a site check corresponding configuration file for the option DocumentRoot. ...
51
votes
Accepted
Failed tls handshake. Does not contain any IP SANs
... Failed to tls handshake with 192.168.2.107 x509: cannot validate certificate for 192.168.2.107 because it doesn't contain any IP SANs
SSL needs identification of the peer, otherwise your ...
51
votes
Accepted
How can I check /dev/xvda1?
Most Linuxes these days should perform a forced fsck at boot time when the file /forcefsck is present on the system.
If you are at liberty to reboot the VM, run
touch /forcefsck
Then reboot at ...
51
votes
Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?
As of right now (April 2016) the answer is:
We do not know yet (but probably not).
The facts
Windows 10 can now run a variety of Linux programs (among
them the Bash shell and various text utilities)...
49
votes
Can I hide all server / os info?
If you have installed nginx using apt-get in Debian or Ubuntu, you might need to install the package nginx-extras to set or clear "Server" header
Once this is done, you can add the lines below in ...
49
votes
How do I rename a Linux host without needing to reboot for the rename to take effect?
You can change the kernel's idea of the hostname on a systemd-based system using the hostnamectl tool. For example:
hostnamectl set-hostname whatever
You can view the system's current idea of the ...
48
votes
Accepted
How do I check if Log4j is installed on my server?
Try this script to get a hint:
echo "checking for log4j vulnerability..."
OUTPUT="$(locate log4j|grep -v log4js)"
if [ "$OUTPUT" ]; then
echo "[WARNING] maybe ...
47
votes
Best location to keep SSL certificates and private keys on Ubuntu servers?
It really doesn't matter where you put them as long as you properly protect your private key file(s). The public certificate is public; no protection needed - server privileges or otherwise.
To expand ...
47
votes
Accepted
How To Tune Apache on Ubuntu 14.04 Server
Recognize that Ubuntu 14.04 uses Apache 2 with PHP running through an mpm_prefork module, of which an editable file is in /etc/apache2/mods-enabled/mpm_prefork.conf. Also, recognize that starting in ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ubuntu × 15856linux × 3441
apache-2.2 × 1143
nginx × 953
ssh × 814
networking × 800
mysql × 666
php × 551
postfix × 488
amazon-ec2 × 472
iptables × 462
debian × 421
apt × 401
security × 343
domain-name-system × 340
apache-2.4 × 324
amazon-web-services × 317
email × 292
ssl × 278
permissions × 261
ubuntu-12.04 × 248
bash × 240
ftp × 231
ubuntu-14.04 × 230
openvpn × 226