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/
638 Comments
Tomi Engdahl says:
How can I run a command called foo, and have it timeout/abort after 10 seconds under GNU/Linux running bash shell or script? How do I run the command under an alarm clock? https://www.cyberciti.biz/faq/shell-scripting-run-command-under-alarmclock/
Tomi Engdahl says:
CentOS Linux 8.1 (1911), derived from Red Hat Enterprise Linux 8.1 Source Code released. Happy upgrades!
https://www.cyberciti.biz/linux-news/centos-linux-8-x-released-and-here-is-how-to-upgrade-it/
#sysadmin #opensource #linux
Tomi Engdahl says:
https://www.cyberciti.biz/hardware/how-to-protects-linux-and-unix-machines-from-accidental-shutdownsreboots-with-molly-guard/
Tomi Engdahl says:
Many Linux user dual boot Linux with Windows 10/8.1 or wipe out install Linux. However, sometimes you need Windows 10, and here is how to find out your original Windows 10 OEM product key using Linux for various reasons. https://www.cyberciti.biz/faq/linux-find-windows-10-oem-product-key-command/ #sysadmin #IT
Tomi Engdahl says:
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000:
php -S 127.0.0.1:8000
python3 -m http.server 8000
python2 -m SimpleHTTPServer 8000
ruby -run -ehttpd . -p8000
https://gist.github.com/willurd/5720255
Tomi Engdahl says:
perl -MIO::All -e ‘io(“:8080″)->fork->accept->(sub { $_[0] < io(-x $1 ? "./$1 |" : $1) if /^GET \/(.*) / })' # multiforking CGI & static server in one line of Perl
Tomi Engdahl says:
Linux find Windows 10 OEM product key command
https://www.cyberciti.biz/faq/linux-find-windows-10-oem-product-key-command/
an echo from the past.
https://superuser.com/questions/637971/how-do-i-get-out-my-embedded-windows-8-key-from-a-linux-environment
Tomi Engdahl says:
Increase Linux Internet speed with TCP BBR congestion control
https://www.cyberciti.biz/cloud-computing/increase-your-linux-server-internet-speed-with-tcp-bbr-congestion-control/
Tomi Engdahl says:
Tales From The Sysadmin: Dumped Into The Grub Command Line
https://hackaday.com/2019/11/25/tales-from-the-sysadmin-dumped-into-the-grub-command-line/
Tomi Engdahl says:
A quick intro to grep for Linux and Unix/macOS users https://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/
Tomi Engdahl says:
Writing Safe Shell Scripts https://www.cyberciti.biz/rd/20.php #Unix #Linux #BashShell
Tomi Engdahl says:
https://www.tecmint.com/difference-between-grep-egrep-and-fgrep-in-linux/
Tomi Engdahl says:
Useful Linux Command Line Bash Shortcuts You Should Know
https://www.tecmint.com/linux-command-line-bash-shortcut-keys/
Tomi Engdahl says:
Shell Script Put Multiple Line Comments under Bash/KSH
https://www.cyberciti.biz/faq/bash-comment-out-multiple-line-code/
Tomi Engdahl says:
How to use parallel ssh (PSSH) for executing ssh in parallel on a number of Linux/Unix/BSD servers
https://www.cyberciti.biz/cloud-computing/how-to-use-pssh-parallel-ssh-program-on-linux-unix/
Tomi Engdahl says:
Bash For Loop Examples
https://www.cyberciti.biz/faq/bash-for-loop/
How do I use bash for loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using for statement? How do I use three-parameter for loop control expression?
Tomi Engdahl says:
{Updated} How to list / view various cron jobs on your Linux or Unix-based system. Now explains how to list jobs from systemd.timer under modern Linux distros too https://www.cyberciti.biz/faq/linux-show-what-cron-jobs-are-setup/
Tomi Engdahl says:
[Update] 25 Outstanding Backup Utilities for Linux Systems in 2020
https://www.tecmint.com/linux-system-backup-tools/
Tomi Engdahl says:
If you are configuring a high available load-balancer using Nginx/HAProxy, you need to set up non-local addresses option for IP failover to work. This page explains how to allow Linux processes to bind to an IP address that doesn’t exist yet. https://www.cyberciti.biz/faq/linux-bind-ip-that-doesnt-exist-with-net-ipv4-ip_nonlocal_bind/ #sysadmin
Tomi Engdahl says:
htop explained
Explanation of everything you can see in htop/top on Linux
https://peteris.rocks/blog/htop/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/install-php-redis-on-centos-8-rhel-8-linux/
Tomi Engdahl says:
http://linuxmagazines.com/how-to-use-the-awk-command-on-linux?fbclid=IwAR2DahsyytAb-bkcKEoHj750PMARF55Feu1G6N6sTviIcySBjgg5kKX23lM
Tomi Engdahl says:
As you may know, Linux retired ‘netstat’ and replaced with ‘ss’ command.
https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html
Tomi Engdahl says:
https://www.cyberciti.biz/faq/unix-linux-appleosx-bsd-shell-appending-date-to-filename/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/unix-date-command-howto-see-set-date-time/
Tomi Engdahl says:
How to set up a firewall using FirewallD on CentOS 8
https://www.cyberciti.biz/faq/how-to-set-up-a-firewall-using-firewalld-on-centos-8/
Tomi Engdahl says:
port of OpenBSD’s doas(1) utility to Linux systems.
https://github.com/multiplexd/doas
Tomi Engdahl says:
eXtern OS – A NodeJS Based Linux Distribution
https://www.tecmint.com/externos-nodejs-based-linux-distribution/
eXternOS is a free, new and exciting Linux operating system based on Nodejs, being developed by a computer engineering and computer science student who goes by name Anesu Chiodze.
It is powered by NW.js which has full support for Node.js APIs and most if not all third-party modules–bringing about limitless possibilities of app development, without looking elsewhere. It brings a new dimension to building native applications with modern web technologies such as HTML5, CSS3, WebGL and more.
In addition, it ships in with highly tweaked and dedicated software for video and audio playback, and a web browser fully compatible with the latest web technologies.
https://externos.io/
Tomi Engdahl says:
Introducing the virt-what and other command for Linux environments that try to detect if it runs on a physical machine or on a virtualized one. https://www.cyberciti.biz/faq/linux-determine-virtualization-technology-command/
Tomi Engdahl says:
How to append text to a file when using sudo command on Linux or Unix
https://www.cyberciti.biz/faq/sudo-append-data-text-to-file-on-linux-unix-macos/
Tomi Engdahl says:
How to enable firewalld logging for denied packets on Linux
https://www.cyberciti.biz/faq/enable-firewalld-logging-for-denied-packets-on-linux/
Tomi Engdahl says:
The growth of command line options, 1979-Present
https://danluu.com/cli-complexity/
We can see that the number of command line options has dramatically increased over time
Ironically, one of the reasons for the rise in the number of command line options is another McIlroy dictum, “Write programs to handle text streams, because that is a universal interface”
Tomi Engdahl says:
https://www.cyberciti.biz/hardware/unix-linux-basic-tape-management-commands/
Tomi Engdahl says:
Unix and Linux command line tricks to increase productivity at the Terminal.
https://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-line-tricks-part-i/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/centos-8-set-up-wireguard-vpn-server/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/centos-8-set-up-openvpn-server-in-5-minutes/
Tomi Engdahl says:
[TUHS] The most surprising Unix programs
https://minnie.tuhs.org/pipermail/tuhs/2020-March/020664.html
Tomi Engdahl says:
Linux Kernel Teaching
https://linux-kernel-labs.github.io/refs/heads/master/index.html
This is a collection of lectures and labs Linux kernel topics. The lectures focus on theoretical and Linux kernel exploration.
The labs focus on device drivers topics and they resemble “howto” style documentation.
Tomi Engdahl says:
https://www.linkedin.com/pulse/xen-hypervisor-411-amd64-autoconfig-install-remi-girard/
Tomi Engdahl says:
Debug bash script:
bash -x script
Or in the script itself:
#!/bin/bash -x
The debugging output goes to stderr when pass the -x. If you would like to log it to a file (mylog) add two line top of the script:
#!/bin/bash
exec 2>> /path/to/mylog
set -x
# rest of your script goes here
Tomi Engdahl says:
https://hackaday.com/2020/03/20/linux-fu-mapping-files/
Tomi Engdahl says:
https://hackaday.com/2019/10/16/pack-your-bags-systemd-is-taking-you-to-a-new-home/
Tomi Engdahl says:
Think You Know CURL? Care To Prove It?
https://hackaday.com/2019/12/27/think-you-know-curl-care-to-prove-it/
Tomi Engdahl says:
Linux Fu: WSL Tricks Blur The Windows/Linux Line
https://hackaday.com/2019/12/23/linux-fu-wsl-tricks-blur-the-windows-linux-line/
Tomi Engdahl says:
All You’ve Ever Wanted To Know About Compilers
https://hackaday.com/2020/01/05/all-youve-ever-wanted-to-know-about-compilers/
Tomi Engdahl says:
https://askubuntu.com/questions/624631/where-should-libraries-be-located-for-the-development-process
https://stackoverflow.com/questions/8835108/how-to-specify-non-default-shared-library-path-in-gcc-linux-getting-error-whil
Tomi Engdahl says:
This page explains how to boost your Linux server’s Internet speed with TCP BBR configurations. https://www.cyberciti.biz/cloud-computing/increase-your-linux-server-internet-speed-with-tcp-bbr-congestion-control/
Tomi Engdahl says:
https://oguya.ch/posts/2015-09-01-systemd-mount-partition/
Tomi Engdahl says:
Linux Fu: Tracing System Calls
https://hackaday.com/2020/04/07/linux-fu-tracing-system-calls/
But if you tell strace to run it, the command becomes:
strace ln -sf testxmit.grc /tmp
You might want to redirect the output to a file using the shell or the -o option, though. Some commands generate a lot and often the first page or two of output isn’t really what you care about anyway.
Tomi Engdahl says:
How to set up a firewall using FirewallD on OpenSUSE Linux https://www.cyberciti.biz/faq/set-up-a-firewall-using-firewalld-on-opensuse-linux/