Linux / Unix Command Examples

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/

http://unixmillenniumbug.com/

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://bash.cyberciti.biz/virtualization/shell-script-to-setup-an-lxd-linux-containers-vm-lab-for-testing-purpose/

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/

612 Comments

  1. 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

    Reply
  2. 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!

    Reply
  3. 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

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*