Here are links to some useful Linux tips:
https://www.cyberciti.biz/faq/linux-unix-appleosx-bsd-cat-command-examples/
https://peteris.rocks/blog/htop/
https://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/
https://www.cyberciti.biz/faq/using-sed-to-delete-empty-lines/
https://www.cyberciti.biz/faq/linux-hide-processes-from-other-users/
https://www.cyberciti.biz/faq/bash-check-if-process-is-running-or-notonlinuxunix/
https://www.cyberciti.biz/faq/unix-linux-bsd-appleosx-bash-assign-variable-command-output/
https://bash.cyberciti.biz/file-management/linux-shell-script-to-reduce-pdf-file-size/
https://www.cyberciti.biz/faq/bash-file-command-not-found-how-to-install-file/
https://www.cyberciti.biz/faq/set-up-a-basic-iptables-firewall-on-amazon-linux-ami/
https://www.cyberciti.biz/faq/fedora-redhat-centos-5-6-disable-firewall/
https://hackertarget.com/ossec-introduction-and-installation-guide/
Awesome. VIM “for people who don’t want to use it , but have to…”. Or see my page https://www.cyberciti.biz/faq/linux-unix-vim-save-and-quit-command/
sudo is the right choice for granting admin rights on the CentOS Linux 8 server. Learn how to create a new user and grant her admin rights https://www.cyberciti.biz/faq/add-create-a-sudo-user-on-centos-linux-8/
643 Comments
Tomi Engdahl says:
https://www.tecmint.com/using-dsh-distributed-shell-to-run-linux-commands-across-multiple-machines/
Tomi Engdahl says:
https://gbhackers.com/ssh3-secure-shell/
Tomi Engdahl says:
How to Impose High CPU Load and Stress Test on #Linux https://www.tecmint.com/linux-cpu-load-stress-test-with-stress-ng-tool/ via @tecmint
Tomi Engdahl says:
https://hackaday.com/2024/02/15/linux-fu-curling-c/
Sometimes, it pays to read the man pages of commands you use often. There might be a gem hidden in there that you don’t know about. Case in point: I’ve used curl (technically, cURL, but I’m going to stick with curl) many times to grab data from some website or otherwise make a web request. But what happens if you want to do the same thing from a C program? Well, you could be lazy and just spawn a copy of curl. But it turns out curl has a trick up its sleeve that can help you. If only I’d read the man page sooner!
Tomi Engdahl says:
Emulating wide area network delays with Linux
NetEm (already enabled in the Linux kernel) provides Network Emulation functionality for testing protocols by emulating the properties of wide area networks.
To simulate an additional latency of 80 ms, just type sudo tc qdisc add dev eth0 root netem delay 80ms
It just adds a fixed amount of delay to all packets going out of the local Ethernet.
To stop the additional latency, just type sudo tc qdisc change dev eth0 root netem delay 0ms
Lines to add to the file /etc/rc.local before exit 0, to add 40ms of latency :
# Add +40ms latency
tc qdisc add dev eth0 root netem delay 40ms
Note: If your network interface is not eth0, replace eth0 with the name of your network interface
Source: https://iperf.fr/iperf-servers.php
Tomi Engdahl says:
https://fabianlee.org/2020/03/17/linux-introducing-latency-and-packet-loss-into-network-for-testing/
Tomi Engdahl says:
https://phoenixnap.com/kb/linux-network-speed-test
Tomi Engdahl says:
https://github.com/microsoft/NetPerfTest-Linux
Tomi Engdahl says:
https://github.com/microsoft/NetPerfTest
Tomi Engdahl says:
https://resources.infosecinstitute.com/topics/general-security/kali-linux-top-5-tools-for-stress-testing/
Tomi Engdahl says:
The Best Network Traffic Generator and Stress Testing Tools for LAN & WAN Bandwidth
https://www.pcwdld.com/network-traffic-generator-and-stress-testing-tools/
WAN/LAN Network Traffic Generators for Bandwidth & Stress Testing
https://www.netadmintools.com/wan-and-lan-network-traffic-generators/
https://www.itprc.com/network-stress-testing/
https://nmap.org/nping/
https://ostinato.org/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/linux-check-memory-usage/
Tomi Engdahl says:
https://hackaday.com/2024/03/26/galvanize-your-grip-on-grep-with-this-great-grep-guide/
Tomi Engdahl says:
say goodbye to the sudo. a sudo replacement called run0 that will be part of the upcoming systemd 256 release. #linux
Docs https://www.freedesktop.org/software/systemd/man/devel/run0.html
So, after they forgot what are nettols for, they forgot what is sudo for. So started inventing things again.
I still use ifconfig instead of ip
I’m sure I’ll be using sudo for quite some time yet..
Tomi Engdahl says:
https://www.karhuhelsinki.fi/blogi/terminaalimultiplekseri-tmux-ystava-johon-voi-luottaa/
Tomi Engdahl says:
https://hackaday.com/2024/05/05/this-windows-installer-installs-linux/
It may be a very long time since some readers have installed a copy of Windows, but it appears at one point during the installation there’s a step that asks you which OS version you would like to install. Normally this is populated by whichever Windows flavours come on the install medium, but [Naman Sood] has other ideas. How about a Windows installer with Alpine Linux as one of the choices? Sounds good to us.
How to install Linux from a Windows installer
I’m not sure why you would want to do this. Presumably for the same reason as me? I also don’t know what that was.
https://prose.nsood.in/linux-from-windows-installer
Tomi Engdahl says:
This page provides instructions on installing and enabling Bash auto-completion on Debian Linux versions 10, 11, and 12 to increase productivity by writing custom bash code https://www.cyberciti.biz/faq/installing-adding-bash-auto-completion-debian-linux/ #Debian #Linux
Tomi Engdahl says:
https://www.cyberciti.biz/faq/installing-dnscrypt-proxy-on-debian-linux/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/how-to-copy-permissions-from-one-file-to-another-on-linux/
Tomi Engdahl says:
https://hackaday.com/2024/05/09/matchbox-transceiver-pushes-the-spy-radio-concept-to-its-limits/
Tomi Engdahl says:
https://hackaday.com/2024/05/21/linux-fu-the-root-cause/
Tomi Engdahl says:
https://porkmail.org/era/unix/award
Tomi Engdahl says:
https://www.zdnet.com/article/new-to-programming-my-5-favorite-linux-tools-will-get-you-up-to-speed-faster/
Tomi Engdahl says:
https://hackaday.com/2024/06/05/floss-weekly-episode-786-what-easy-install-script/
Tomi Engdahl says:
https://hackaday.com/2024/06/04/tunneling-tcp-by-file-server/
Tomi Engdahl says:
https://github.com/fiddyschmitt/File-Tunnel
Tomi Engdahl says:
https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/
Tomi Engdahl says:
https://www.zdnet.com/article/5-linux-commands-you-need-to-know-to-troubleshoot-problems/
Tomi Engdahl says:
https://www.msn.com/fi-fi/uutiset/other/mit%C3%A4-ihmett%C3%A4-n%C3%A4pp%C3%A4imist%C3%B6n-scroll-lock-n%C3%A4pp%C3%A4in-tekee/ar-BB1oH1Qe?ocid=entnewsntp&pc=HCTS&cvid=72c2dfaa455b407f8f21556d532ef6b7&ei=12
Tomi Engdahl says:
https://hackaday.com/2024/07/03/floss-weekly-episode-790-better-bash-scripting-with-amber/
Tomi Engdahl says:
https://www.howtogeek.com/will-linux-run0-command-run-sudo-out-of-town/
Tomi Engdahl says:
https://www.howtogeek.com/terminal-commands-you-can-run-on-windows-that-give-big-hacker-vibes/
Tomi Engdahl says:
https://www.howtogeek.com/things-i-do-after-installing-linux/
Tomi Engdahl says:
Running 26 Linux distributions as containers. How much RAM do you think it will consume? The answer might surprise you, my friends. Just 1.2Gi RAM used on the freshly rebooted machine. Of course, this is a test lab running Ubuntu fully patched 22.04 LTS. But you get the gist. This stuff is born for enterprise workload. Here is how to set up a lab using shell script for fun and profit https://www.cyberciti.biz/faq/shell-script-to-set-up-an-lxd-incus-linux-containers-lab-for-testing-purpose/ #linux #devops #sysadmin #opensource
Tomi Engdahl says:
https://www.howtogeek.com/linux-commands-that-help-with-troubleshooting/
Tomi Engdahl says:
Rust for Linux maintainer steps down in frustration with ‘nontechnical nonsense’
Community seems to C Rust more as a burden than a benefit
https://www.theregister.com/2024/09/02/rust_for_linux_maintainer_steps_down/
Efforts to add Rust code to the Linux kernel suffered a setback last Thursday when one of the maintainers of the Rust for Linux project stepped down – citing frustration with “nontechnical nonsense.”
Wedson Almeida Filho, a software engineer at Microsoft who has overseen the Rust for Linux project, announced his resignation in a message to the Linux kernel development mailing list.
“I am retiring from the project,” Filho declared. “After almost four years, I find myself lacking the energy and enthusiasm I once had to respond to some of the nontechnical nonsense, so it’s best to leave it up to those who still have it in them.”
Tomi Engdahl says:
lnav – Awesome terminal log file viewer for Linux and Unix
https://www.cyberciti.biz/open-source/lnav-linux-unix-ncurses-terminal-log-file-viewer/#google_vignette
Tomi Engdahl says:
https://www.cyberciti.biz/open-source/command-line-hacks/linux-ls-commands-examples/#google_vignette
Tomi Engdahl says:
https://hackaday.com/2024/11/26/alternatives-dont-need-to-be-bashed/
Tomi Engdahl says:
https://hackaday.com/2024/11/26/linux-fu-audio-network-pipes/
Sound System Overview
Someone once said, “The nice thing about standards is there are so many of them.” This is true for Linux sound, too. The most common way to access a soundcard is via ALSA, also known as Advanced Linux Sound Architecture. There are other methods, but this is somewhat the lowest common denominator on most modern systems.
However, most modern systems add one or more layers so you can do things like easily redirect sound from a speaker to a headphone, for example. Or ship audio over the network.
The most common layer over ALSA is PulseAudio, and for many years, it was the most common standard. These days, you see many distros moving to PipeWire.
PipeWire is newer and has a lot of features but perhaps the best one is that it is easy to set it up to look like PulseAudio. So software that understands PipeWire can use it. Programs that don’t understand it can pretend it is PulseAudio.
There are other systems, too, and they all interoperate in some way. While OSS is not as common as it once was, JACK is still found in certain applications. Many choices!
One Way
There are many ways you can accomplish what I was after. Since I am running PipeWire, I elected to use qpwgraph, which is a GUI that shows you all the sound devices on the system and lets you drag lines between them.
It is super powerful but also super cranky. As things change, it tends to want to redraw the “graph,” and it often does it in a strange and ugly way. If you name a block to help you remember what it is and then disconnect it, the name usually goes back to the default. But these are small problems, and you can work around them.
In theory, you should be able to just grab the output and “wire” it to the other program’s input. In fact, that works, but there is one small problem. Both PipeWire and PulseAudio will show when a program is making sound, and then, when it stops, the source vanishes.
Tomi Engdahl says:
An Introduction To Developing From the Command Line in Linux
This tutorial is a beginner’s guide to writing code in Linux using just command-line tools instead of full-featured IDEs.
https://thenewstack.io/an-introduction-to-developing-from-the-command-line-in-linux/
Tomi Engdahl says:
Fwupd 2.0.2 Allows Updating Firmware On Many More Devices
https://www.phoronix.com/news/Fwupd-2.0.2-Released
Richard Hughes of Red Hat has released Fwupd 2.0.2 as the newest update to this open-source firmware updating solution for Linux systems.
Fwupd 2.0.2 adds support for checking the AMD hardware configuration MSR, support for enumerate-only device emulation to increase Fwupd test coverage, support for passing a JSON file for emulation rather than ZIP files, and dropping support for obsolete CSR DFU and Nitrokey devices. There are also many bug fixes.
Tomi Engdahl says:
https://hackaday.com/2024/12/15/finally-a-man-page-for-life/