general_commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general_commands [2022/10/17 22:50] – [tee] gman | general_commands [2024/06/19 22:27] (current) – gman | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== CLI: Commands & Usage ====== | ====== CLI: Commands & Usage ====== | ||
+ | |||
+ | ===== apt ===== | ||
+ | |||
+ | < | ||
+ | # [1] Update package repo | ||
+ | apt update | ||
+ | |||
+ | # [2] Upgrade your distro | ||
+ | apt full-upgrade -y | ||
+ | |||
+ | # [3] Remove obsolete packages left after the upgrade | ||
+ | apt autoremove | ||
+ | |||
+ | # [4] Clear local repo of useless package files | ||
+ | apt autoclean | ||
+ | |||
+ | # Or do it all in one line: | ||
+ | apt update && apt full-upgrade -y && apt autoremove && apt autoclean | ||
+ | </ | ||
+ | |||
+ | ---- | ||
===== arp ===== | ===== arp ===== | ||
Running '' | Running '' | ||
+ | |||
+ | ---- | ||
===== check distro ===== | ===== check distro ===== | ||
Line 20: | Line 43: | ||
pending | pending | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== dd ===== | ||
+ | |||
+ | ==== wipe a disk ==== | ||
+ | |||
+ | Fill the disk with all zeros (may take a while; it switches every bit to 0): | ||
+ | |||
+ | |||
+ | < | ||
+ | dd if=/ | ||
+ | |||
+ | # replace X with the target drive letter. | ||
+ | </ | ||
+ | |||
+ | To secure wipe, populate the entire disk with random data rather than zeros (takes longer): | ||
+ | |||
+ | < | ||
+ | dd if=/ | ||
+ | |||
+ | # replace X with the target drive letter. | ||
+ | </ | ||
+ | |||
+ | Sincd '' | ||
+ | |||
+ | < | ||
+ | watch vmstat -d | ||
+ | htop | ||
+ | </ | ||
---- | ---- | ||
Line 194: | Line 247: | ||
[cli program] | sed -r ' | [cli program] | sed -r ' | ||
- | # -r use extended regular expressions | + | # -r |
- | # s s/ | + | # |
+ | # \x1b The ASCII " | ||
+ | # Used to start a series of characters called a control sequence or escape sequence | ||
+ | </ | ||
+ | |||
+ | And you could always alias that in your '' | ||
+ | |||
+ | < | ||
+ | alias tee=" | ||
</ | </ | ||
---- | ---- | ||
+ | ===== tr ===== | ||
+ | |||
+ | **Translate: | ||
+ | |||
+ | < | ||
+ | sha256sum filename.ext | tr [:lower:] [:upper:] | ||
+ | </ | ||
+ | |||
+ | ---- | ||
===== untar ===== | ===== untar ===== |
general_commands.1666047003.txt.gz · Last modified: by gman