ps # ps (1) - report a snapshot of the current processes.
Print all process information with BSD syntax:
ps aux Print process information for all processes in full format:
ps -ef Print process information for all processes in extra full format, long format:
ps -eFl Format ps output:
ps -o comm,pid,ppid,user Print processes matching a specific command name:
ps -C sshd List all processes owned by a specific user:
...
Basic Usage # Stream editor for filtering and transforming text
[me@linuxbox ~]$ echo "front" | sed 's/front/back/' back sed will accept any character that follows the character as the delimiter.
[me@linuxbox ~]$ echo "front" | sed 's_front_back_' back~ Most commands in sed can be preceded by an address, specifying which lines of input streams are to be edited.
[me@linuxbox ~]$ echo "front" | sed '1s/front/back/' back Address Notation # Address Description n A line number where n is a positive integer $ The last line.
...
SSH Client #
ssh-copy-id # Copy public keys to a remote host’s ~/.ssh/authorized_keys file.
Not technically part of OpenSSH. Helper utility written as a drop-in replacement for an existing utility in OpenSSH.
Source - freebsd.org Example usage:
ssh-copy-id -i ~/.ssh/id_ed25519.pub <user>@<IP Address>
ssh-keygen # Default key that’s generated isn’t considered secure anymore.
Better to generate a ed25519 key. I’m not sure why this is just yet. That would require further research. But I just know that this is more secure.
ssh-keygen -t ed25519 -C "stovepipe default"
tcpdump # Tutorials # https://danielmiessler.com/study/tcpdump/
Tmux # Synchronize panes: https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/01-prerequisites.md#running-commands-in-parallel-with-tmux
Resources # Tutorials # https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/ Configuration # https://wiki.archlinux.org/title/tmux We tend to forget how useful the arch wiki is for tmux https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ https://www.themoderncoder.com/basic-tmux-configuration/ https://thevaluable.dev/tmux-config-mouseless/ Dotfiles # https://github.com/kraker/dotfiles/tree/master/tmux Statusline # https://arcolinux.com/everything-you-need-to-know-about-tmux-status-bar/
tty # tty
Set the default file permissions
umask numbers correspond to the 3 digit binary number that controls, rwx permissions. Everywhere there’s a 1 it un-sets the file permission. Example: umask 0022
Default is 666 for files and 777 for directories.
Original file mode — rw- rw- rw- Mask 000 000 010 010 Result — rw- r– r– Default umask is 0022.
...