261
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
120
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. (...
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....
80
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,...
75
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 ...
68
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
-- ------ --...
65
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 ...
57
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 ...
55
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. ...
54
votes
Ubuntu displays "There is 1 zombie process" upon login
I was able to end the zombie process following this tutorial - https://vitux.com/how-to-kill-zombie-processes-in-ubuntu-18-04/.
Basically:
1) Identify the zombie process:
ps axo stat,ppid,pid,comm |...
53
votes
UFW Enable requires y prompt, how to automate with Bash Script?
You could use:
$ sudo ufw --force enable
53
votes
Accepted
Cannot mount block device /dev/loop read-only
Probably, your XFS filesystem has a dirty log that needs to be replayed to give you a consistent filesystem. However, the ro mount option prevents that.
Try mounting adding norecovery, for example:
...
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)...
51
votes
Accepted
Nginx duplicate listen options for [::]:80 error
I'm creating an answer out of my earlier comment.
Please post the error message (nginx -t output) as it could contain some useful insight.
What nginx version are you running? Option ipv6only=on ...
50
votes
Accepted
How do I see the changelog for a debian/ubuntu deb package?
Alternatively if the deb is also in the repository and you want to know older versions changelog, you can use apt-get changelog package to read all the changelog. For example for openssl:
apt-get ...
50
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 ...
49
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 ...
44
votes
How can I list the current Apache 2 virtual hosts from the command line?
The command a2query -s works perfectly for me.
44
votes
Accepted
Ubuntu 15.10 Server; W: Possible missing firmware /lib/firmware/ast_dp501_fw.bin for module ast
Its annoying, but harmless. That is coming from the Aspeed VGA module from the IPMI on your server/workstation. It can be safely ignored for now. I took a quick look at the source code of the ...
43
votes
Accepted
MySQL 5.7 bind-address doesn't work
They changed the MySQL package so that the bind parameter is in /etc/mysql/mysql.conf.d/mysqld.cnf now. Please change the bind parameter there and remove anything you placed in /etc/mysql/conf.d/mysql....
40
votes
Using rsync from msysgit for binary files
My original instructions to get rsync working with Git for Windows were quite a bit outdated, so I've revamped this answer for mid-2023 to cover MSYS2's switch to zstd and the additional dependencies ...
39
votes
How to view all ssl certificates in a bundle?
openssl storeutl -noout -text -certs bundle.crt
Paraphrasing from the OpenSSL documentation:
The openssl storeutl app was added in OpenSSL 1.1.1.
The storeutl command can be used to display the ...
38
votes
Accepted
Stop Apache gracefully
Yes.
apachectl -k graceful-stop
https://httpd.apache.org/docs/2.4/stopping.html
36
votes
How to set vim filetype when editing nginx config files
There's actually an Nginx file type defined in the official Nginx repository in the contrib/vim directory. It provides better syntax highlighting than conf.
To use it, copy the detection lines to ...
36
votes
Accepted
Is microk8s suitable for production environments, or is it just for development?
just to update to 2020 - This is from canonical:
What is MicroK8s?
MicroK8s is a powerful, lightweight, reliable production-ready Kubernetes distribution. It is an enterprise grade Kubernetes ...
35
votes
Accepted
ls command doesn't show folder but I can't create it because folder already exists
ls by itself does not show hidden directories (hidden directories and files are ones that start with a ., such as .ssh)
Try using ls -a in the directory.
From the ls manpage:
-a, --all
do ...
34
votes
How to view all ssl certificates in a bundle?
Oneliner that displays a summary of every certificate in the file.
openssl crl2pkcs7 -nocrl -certfile CHAINED.pem | openssl pkcs7 -print_certs -noout
It combines all the certificates into a single ...
33
votes
Launch Nginx on startup
To start nginx on boot: sudo systemctl enable nginx (doesn't start it immediately)
To start nginx: sudo systemctl start nginx
33
votes
Can't get bower working - bower ESUDO Cannot be run with sudo
That won't work if it is a script someone else has written which is complaining (as if often the case using Docker, for example).
In that case, you should ensure that the following command is run ...
33
votes
Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host
If it is a DNS resolver problem, here is the solution:
First thing to check is run cat /etc/resolv.conf in the docker container. If it has an invalid DNS server, such as nameserver 127.0.x.x, then ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ubuntu × 16577linux × 3582
apache-2.2 × 1150
nginx × 1030
ssh × 860
networking × 851
mysql × 693
php × 566
postfix × 513
iptables × 488
amazon-ec2 × 480
debian × 441
apt × 421
domain-name-system × 355
security × 355
apache-2.4 × 349
amazon-web-services × 335
ssl × 298
email × 296
permissions × 269
docker × 255
ubuntu-12.04 × 249
bash × 248
openvpn × 241
linux-networking × 235