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 ...
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. (...
mivk's user avatar
  • 4,442
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....
Carlos Rafael Ramirez's user avatar
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,...
cnst's user avatar
  • 14.3k
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 ...
MLu's user avatar
  • 25.4k
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 -- ------ --...
Justin Fortier's user avatar
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 ...
user144437's user avatar
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 ...
packetlord's user avatar
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. ...
ALex_hha's user avatar
  • 7,303
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 |...
guizo's user avatar
  • 641
53 votes

UFW Enable requires y prompt, how to automate with Bash Script?

You could use: $ sudo ufw --force enable
Everaldo Canuto's user avatar
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: ...
shodanshok's user avatar
  • 50.5k
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)...
sleske's user avatar
  • 10.1k
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 ...
simlev's user avatar
  • 1,145
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 ...
PhoneixS's user avatar
  • 626
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 ...
Michael Hampton's user avatar
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 ...
rubo77's user avatar
  • 2,519
44 votes

How can I list the current Apache 2 virtual hosts from the command line?

The command a2query -s works perfectly for me.
vishalknishad's user avatar
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 ...
Jeff Burns's user avatar
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....
Linuxx's user avatar
  • 1,189
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 ...
nextgentech's user avatar
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 ...
gillyb's user avatar
  • 491
38 votes
Accepted

Stop Apache gracefully

Yes. apachectl -k graceful-stop https://httpd.apache.org/docs/2.4/stopping.html
Sven's user avatar
  • 99.5k
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 ...
colan's user avatar
  • 520
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 ...
luishdez's user avatar
  • 476
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 ...
Patrick's user avatar
  • 498
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 ...
harmv's user avatar
  • 449
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
Ben Butterworth's user avatar
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 ...
DMCoding's user avatar
  • 492
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 ...
wisbucky's user avatar
  • 1,129

Only top scored, non community-wiki answers of a minimum length are eligible