Search
A shell script! You don't need a shebang line, just invoke it as /bin/sh script.sh, but if you want to add one (e.g. perhaps you anticipate doing this more than once) Then you can copy the command...
You can't expect an attacker to abide by any particular rulebook. In fact, if they did, then the defenders' job would be so much easier. That's why attackers don't do it. Remember the adage: a de...
Categories should be used for broad categories of posts. For example, see how Writing separates the main Q&A from writing challenges, or how Cooking separates its Q&A from recipes, or how M...
On a Debian Buster system I use, the password for connecting to a VPN is stored in the GNOME Keyring. Therefore, whenever I want to connect to the VPN in question, I get prompted to unlock my keyri...
As we start on building a new community here together, we're bound to find some sticking points. Those might be bugs, new features you need, things you need support with... whatever they are, the C...
According to the keyboard layout wiki, keyboard configurations (for both the console and Xorg) can be conveniently set using the localectl command. In order to set a second keyboard layout, we hav...
Where can I find documentation on double asterisk in glob expansion? It is discussed in the .gitignore section of Pro Git. It works in ls **/* to list all terminal files. It is supported by py...
For most users, in $HOME/.config/gtk-3.0/bookmarks. Otherwise, if you set the XDG_CONFIG_HOME environment variable (which you can inspect with env), in $XDG_CONFIG_HOME/gtk-3.0/bookmarks. From the...
From man xxd, the section on the -r flag (emphasis added): -r | -revert reverse operation: convert (or patch) hexdump into binary. If not writing to stdout, xxd writes into its output file with...
What you describe is a typical mixed authoritative/recursive resolver setup. Such a DNS server setup will respond from its own data about zones for which it has explicit configuration, and will per...
Linux does have the concept of a RAM DRIVE (multiple concepts actually, including ramfs and tmpfs being common). You should look at https://en.wikipedia.org/wiki/Zram - ZRAM claims to be exactly ...
There are many GUI apps on my computer that show up as eg. items in the start menu. When I launch these, what if I want to control how exactly they are launched, such as setting environment variabl...
I would consider your own tools as the central use case. Seriously, do you want to litter every while read (or your language's equivalent) with this pesky corner case handling? while read -r line ...
The simple and obvious solution: sed 's/^ *//;s/ *$//' Many recipes you find online will erroneously add a g flag, but these regular expressions can only match once per line anyway. (In some m...
If these requests are logged into a log file you can install fail2ban and configure it to act on these log entries. You can configure it to block the requests via the local firewall for a duration ...
I have a laptop running Ubuntu 24.04.1 LTS that I would like to access with Remote Desktop (or VNC)[1] from a Mac. I found the Ubuntu system settings to enable Remote Desktop and am able to connec...
For a couple of days now I've been trying to edit this answer to include an example that was requested in the comments. Every time I try to edit it I'm presented with this: The expanded answer ...
How to get the version of the currently running Linux kernel? I'm looking for a commandline solution, but feel free to post GUI solutions as well.
You can find the version information in /proc/version. $ cat /proc/version Linux version 6.8.0-53-generic (buildd@lcy02-amd64-046) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, ...
Login screen Check your login screen. Login Managers often give an option to select between different desktop environments. The last used entry is usually highlighted. It is possible that your ...
GNU which does the trick: $ which find /usr/bin/find It's very likely already installed.
When I do rg foo /bar/baz/, ripgrep will search for foo in all files under /bar/baz/. For every file that has matching lines, it will print each line with its line number, highlight the matching pa...
I'm quite certain that rsync is not able to deduce that /path/to/src/folder_a/file_w on one side of the transfer is identical to /path/to/src/folder_c/file_w on the other side of the transfer. The...
On a default Arch install, faillock makes it so that if you enter the sudo password wrong too many times, even the correct password will be rejected until the timer is up. At the same time, you ca...
Especially in a pedagogical context, the issue with something like cat /dev/random | head -c 20 versus the more straightforward head -c 20 /dev/random is that it communicates that extra ceremony is...