Check These Out
The command is useful when, e.g., booting an existing system with a rescue or installation CD where you need to chroot into the hard-disk and be able to do stuff which accesses kernel info (e.g. when installing Ubuntu desktop with LVM2 you need to mount and chroot the hard disk from a shell window in order to install packages and run initramfs inside chroot).
The command assumes that /mnt/xxx is where the chroot'ed environment's root file system on the hard disk is mounted.
Usefull to determine unknown file type
Quick and dirty forkbomb for all flavors of windows
Do not use in production. Replace start with a command of your choice, this will just open a new command prompt and is pretty tricky to stop once started
Useful to get network access to a machine behind shared IP NAT. Assumes you have an accessible jump host and physical console or drac/ilo/lom etc access to run the command.
Run the command on the host behind NAT then ssh connect to your jump host on port 2222. That connection to the jump host will be forwarded to the hidden machine.
Note: Some older versions of ssh do not acknowledge the bind address (0.0.0.0 in the example) and will only listen on the loopback address.
In pre-systemd systems, something like: "# grep sshd /var/log/messages" would display log events in /var/log/messages containing "sshd".
# journalctl -u sshd --no-pager
The above command displays similar results for systemd systems.
(Note that this needs to be run with root permissions to access the log data.)
GNU grep's PCRE(Perl-compatible regular expressions).
Search for one/many words on commandlinefu, results in vim for easy copy, manipulation. The -R flag is for readonly mode...you can still write to a file, but vim won't prompt for save on quit.
What I'd really like is a way to do this from within vim in a new tab. Something like
$ :Tex path/to/file
but
$ :cmdfu search terms
Can be used to create path alias.
From: https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html. #9
Maybe you know shorter ?
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"