Search
How to get the number of lines in a file? I.e. for a file like this: Line one Line 2 Final line I would like to do something like this: $ count-lines /path/to/the/file/above 3
For reasons of my own, I have services on my LAN which use HTTPS and I create my own certificates for these. Over the years, the usage of TLS has evolved considerably. Many features that were once...
I want to connect to my university network via OpenVPN under Fedora GNOME. I imported the openvpn configuration provided by the university in the Network Manager GUI and specified the user certifi...
xmllint from xmllib2 can do this: $ output-dirty-xml | xmllint --format - The dash in the end tells xmllint to read from stdin instead of a file. Source: manpage
I've been learning some Linux and I finally feel like I can find my way around the command line. But now I hear people say there are other, "non-POSIX" kinds of shell, with different semantics. Wha...
You want shuf. shuf -n1 -i 534-876874
In gpg(1), one normally adds recipients of an encrypted message with --recipient. Those recipients will be able to decrypt the message, and their key ID will appear unencrypted, so anyone will kno...
Motivating example: my Mint 20.3 distribution offers long-term support until April 2025, which matches the "standard support" offered for the upstream Ubuntu (20.04 "Jammy Jellyfish"). However, the...
When an upstream project stops supporting a version (e.g., Python stops supporting 3.8), the maintainers of the distribution do the job of supporting those components, applying security patches as ...
How to convert a json file to yaml? Technically json is already valid yaml, but I'm talking about the characteristic easy-to-read yaml formatting with indentation and minimal quotes.
I saw another post recommend using Fedora if you want cutting edge features. Is Fedora really a "cutting edge" distro? I am not very familiar with Fedora, I know it's a community counterpart to R...
The local port range on my Arch Linux installation is 32768-60999 according to cat /proc/sys/net/ipv4/ip_local_port_range Wikipedia states that this range is "used by many Linux kernels" and th...
No need to search for a key ID. Just type the e-mail associated with your key and export your public key like this: $ gpg --export -a something@example.net > my_key.asc
On Debian, the package manager can tell the versions of the installed software. Let's say we want to know the version of mbsync(1). Quoting a comment by @matthewsnyder, this is a 3 step process: ...
On a modern Linux system, what happens if you attempt to hibernate when your swap is smaller than your RAM? For example, say RAM is 16 GB and swap is 8 GB.
How do I find the exact code of a key on my keyboard?
My DE has a bunch of programs in the start/applications menu. How can I add my own in there? For example, say I found a terminal command foo --bar --baz that does something I want. But I don't want...
On Linux, the basic way to run every program is to invoke it through a terminal. The shortcuts in DEs come from ".desktop" files. On a Linux system, there are a couple of directories (system wide,...
When I view my document camera's feed in guvcview it is in landscape mode. I want it to capture things in portrait mode, since I usually take photos of documents. Currently, I have to rotate all t...
If the program was installed with your package manager, the package manager should be able to tell you that. For example: $ pacman --query bash bash 5.2.026-2 If you don't know the package n...
Keep both your / and /home on the SSD, and then create the /data partition on your HDD. You could link individual directories from home as you say, but I usually create just one link to the HDD ro...
There is a popular partitioning scheme, described in the Arch wiki as LVM on LUKS. The meat of this is: /boot is its own unencrypted partition The rest of the drive is a giant LUKS partition I...
First, consider your needs. There's a decent chance that everything you want will fit on the SSD anyway, at least if you aren't an enthusiastic multimedia collector. Nowadays a 1TB SSD can be had c...
When I use my computer, one question I commonly want to answer for myself is "how much space is being used by the contents of this folder?". Typical file/window managers, IMX, answer this question ...
How do I find all actual files (not devices, sockets, etc) on my system that are: Not part of a package Not under /home (I assume that packages are supposed to never put files there) on Arch...