Show Menu
Cheatography

TurnTorial Cheat Sheet (DRAFT) by

Basic Commands + Software Everyone Uses

This is a draft cheat sheet. It is a work in progress and is not finished yet.

tMux

Action Key ()
Ctrl-B
See Active Sessions
tmux ls
Attach Session
tmux a (-t <se­ssion id>)
Split View (H or V)
+ % or "
Paste
+ ]
Move to tmux
Ctrl-Z, bg, jobs -l, disown XXX, tmux, reptyr -L XXX
Close pane
Ctrl-D
name session
+ $
Zoom
+ z.
Synchr­onize panel input
+ a

vi / neoVim

Goto line 5
5G or 5gg
Delete line
dd

OpenSuse

install
sudo zypper in <pa­cka­ge>
install other
opi <pa­cka­ge>
software
htop, tmux, neovim, solaar, vs code, lucmos­/Ul­tra­wid­eWi­ndows
 
prox sys bbr for better downloads
Window manager
Ctrl-W­in+­numpad -> 25/50/25

Open Build Server

checkout
osc co NAME:O­F:D­EV-­TICKET
build
cd NAME:O­F:D­EV-­TIC­KET­/bo­nding/; osc build Debian_11
 

Bondin­gAdmin

enter
mdep nsenter ba
set user
su - bondin­gadmin
set venv
. /var/l­ib/­bon­din­gad­min­/en­vir­onm­ent­/bi­n/a­ctivate
test
cd /bi/bo­ndi­nga­dmi­n/d­jango/ && ./mana­ge.py test --para­llel=15
test with new DB
./mana­ge.py test --parallel 15 --recr­eate-db
use local
./mana­ge.py runserver 0.0.0.0­:8000 2> >(grep MIKEM)
url local
build
./build.sh build -j17 && ./build.sh install && bondin­gad­min­-setup ; systemctl restart bondin­gadmin

Bonding

enter
mdep nsenter bond1
test
make test
build
make restart
add-in­terface
mdep add-br­idg­e-i­nte­rface bond1 br0 leg2
repo

QA

build (/bi/e­strada)
qa build-­image app:bo­ndi­ng:­ope­nsu­se:­tum­bleweed

mdep

create agg
mdep create agg2 image=­dis­t:d­ebi­an:­bul­lseye; mdep start agg2; mdep nsenter agg2; go to web ba, spaces -> node setup
resize image
mdep resize agg2 8G
 

git

git commit -m "­First release of Hello World!­"
git cherry -v destin­ati­on_­branch source­_branch
git cherry­-pick commit_id
git log --name­-status HEAD^..HEAD
exec ssh-agent bash && ssh-add

Command Line Tidbits

find text in files
grep -r text_t­o_find *
firefox detatch tab
ctrl-L, Win-Sh­ift­-Enter
journalctl - time
journalctl --since "1 hour ago"
journalctl - unit
journalctl -u nginx.s­ervice
journalctl - other
-r (reverse) -n (number) -f (follow)

Network Analysis

Packets Per Second
bwm-ng --unit packets
Show TCP Pkts
tcpdump -ni host0 port 2001
list routing rules
ip rule list
list table from routing rule
ip route show table XXX
modify NFT rules
nft list ruleset > rules.nft; edit rules.nft (add flush ruleset; as first line, add counters); import: nft -f rules.nft
list all routing IPT
iptables -t nat -L -n -v
list all routing NFT
nft list ruleset
add routing NFT
nft insert rule inet filter input ip6 saddr $IP_ADDR drop
list routing NFT
nft -a list chain inet filter input
del routing NFT
nft delete rule inet filter input handle 59
host webserver
/bi/es­tra­da/­qa/­bin­/te­st-­web­server 8080
fetch webserver
curl 172.30.0.1­:8­080­/un­com­pre­ssi­ble­?si­ze=­120­000000 -o /dev/null
ping flood
sudo ping -f 172.30.0.0
renew ip address
dhclient (or dhclient -R)
nft tracing
add trace to rule meta mark eq 0xf0 meta nftrace set 1; then watch in console nft monitor trace