notes:misc_linux
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| notes:misc_linux [2024/01/24 11:23] – [Fedora Anaconda] Sean Rhone | notes:misc_linux [2024/08/13 17:53] (current) – removed Sean Rhone | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Information ====== | ||
| - | |||
| - | * Miscellaneous commands, paths, info, and syntax for Linux | ||
| - | * Most of this was previously under the " | ||
| - | |||
| - | ====== Extract ISO ====== | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * No space after the '' | ||
| - | * This is primarily useful for copying Windows ISO images to a FAT32 flash drive | ||
| - | |||
| - | 7z x -o' | ||
| - | |||
| - | 7z x -o'/ | ||
| - | |||
| - | ====== youtube-dl ====== | ||
| - | |||
| - | * :!: TODO: Switch to yt-dlp https:// | ||
| - | |||
| - | ===== Download ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | rm -f '/ | ||
| - | |||
| - | ===== Show Formats ===== | ||
| - | |||
| - | * Change '' | ||
| - | |||
| - | '/ | ||
| - | |||
| - | ===== Download Media ===== | ||
| - | |||
| - | * Change '' | ||
| - | * '' | ||
| - | |||
| - | '/ | ||
| - | |||
| - | ==== M4A Audio ==== | ||
| - | |||
| - | * Ideally for if iOS devices will be involved | ||
| - | |||
| - | '/ | ||
| - | |||
| - | ==== MP3 Audio ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | '/ | ||
| - | |||
| - | ====== Shortcuts ====== | ||
| - | |||
| - | / | ||
| - | |||
| - | ~/ | ||
| - | |||
| - | ====== Icons ====== | ||
| - | |||
| - | / | ||
| - | |||
| - | ~/ | ||
| - | |||
| - | ====== Fedora ====== | ||
| - | |||
| - | ===== Anaconda Module Blacklists ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo -e '/ | ||
| - | |||
| - | ===== YUM/DNF Repos ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | gio open '/ | ||
| - | |||
| - | ===== DNF History ===== | ||
| - | |||
| - | ==== Transaction IDs ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo dnf history | ||
| - | |||
| - | ==== Undo ==== | ||
| - | |||
| - | * Change '' | ||
| - | |||
| - | sudo dnf history undo x | ||
| - | |||
| - | ===== DNF Autoremove Fix ===== | ||
| - | |||
| - | * Removes the initially-installed kernel in order to fix '' | ||
| - | * :!: This will vary depending on the Fedora image version used | ||
| - | |||
| - | sudo dnf list --installed ' | ||
| - | |||
| - | sudo dnf remove *5.3.7* && sync | ||
| - | |||
| - | ====== openSUSE ====== | ||
| - | |||
| - | ===== Zypper ===== | ||
| - | |||
| - | ==== Find Orphans ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | zypper packages --orphaned | ||
| - | |||
| - | ==== Remove Package and Deps ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo zypper remove --clean-deps ' | ||
| - | |||
| - | ==== Show Installed Patterns ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo zypper patterns --installed-only | ||
| - | |||
| - | ==== Folder ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | ls '/ | ||
| - | |||
| - | ==== List ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | zypper repos --priority | ||
| - | |||
| - | ====== Firewalld ====== | ||
| - | |||
| - | ===== List Active Rules ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo firewall-cmd --list-all | ||
| - | |||
| - | ===== List Available Services ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo firewall-cmd --get-services | ||
| - | |||
| - | ===== Show Service Info ===== | ||
| - | |||
| - | * Change '' | ||
| - | * This shows what ports and protocols a service covers | ||
| - | |||
| - | sudo firewall-cmd --info-service=x | ||
| - | |||
| - | ===== Reload ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo firewall-cmd --reload | ||
| - | |||
| - | ===== Add/Remove Service ===== | ||
| - | |||
| - | * Add '' | ||
| - | |||
| - | sudo firewall-cmd --add-service=x | ||
| - | |||
| - | sudo firewall-cmd --remove-service=x | ||
| - | |||
| - | ===== Add/Remove Port ===== | ||
| - | |||
| - | * Add '' | ||
| - | * Change '' | ||
| - | |||
| - | sudo firewall-cmd --add-port=x/ | ||
| - | |||
| - | sudo firewall-cmd --remove-port=x/ | ||
| - | |||
| - | ====== PipeWire ====== | ||
| - | |||
| - | ===== Set Default Rate ===== | ||
| - | |||
| - | mkdir -p ~/' | ||
| - | |||
| - | < | ||
| - | context.properties = { | ||
| - | default.clock.rate | ||
| - | default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ] | ||
| - | }</ | ||
| - | |||
| - | ===== User Config ===== | ||
| - | |||
| - | * Copy main config to user folder | ||
| - | |||
| - | mkdir -p ~/' | ||
| - | |||
| - | nano ~/' | ||
| - | |||
| - | ===== Read Main Config ===== | ||
| - | |||
| - | * [[https:// | ||
| - | |||
| - | gio open '/ | ||
| - | |||
| - | nano '/ | ||
| - | |||
| - | ===== WirePlumber Settings Reset ===== | ||
| - | |||
| - | sudo rm -Rf ~gdm/' | ||
| - | |||
| - | rm -Rf ~/' | ||
| - | |||
| - | ====== GPG Keys ====== | ||
| - | |||
| - | ===== Check Keys ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | rpm -q gpg-pubkey --qf ' | ||
| - | |||
| - | ===== Remove Keys ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo rpm -e x | ||
| - | |||
| - | ====== Re-generate Thumbnails ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | rm -Rf ~/' | ||
| - | |||
| - | ====== List GNOME gsettings ====== | ||
| - | |||
| - | * Change '' | ||
| - | |||
| - | gsettings list-recursively ' | ||
| - | |||
| - | ====== GNOME App Grid Reset ====== | ||
| - | |||
| - | * [[https:// | ||
| - | |||
| - | gsettings reset ' | ||
| - | |||
| - | ====== GNOME Software Maintenance ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | pkcon -c ' | ||
| - | |||
| - | ====== fstrim ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo fstrim --verbose --all | ||
| - | |||
| - | ====== SELinux Re-label ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo touch '/ | ||
| - | |||
| - | ====== tracker3 Reset ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | < | ||
| - | |||
| - | ====== GNOME Monitors Reset ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | rm -f ~/' | ||
| - | |||
| - | ====== PulseAudio Reset ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | rm -f ~/' | ||
| - | |||
| - | ====== Xorg Debug ====== | ||
| - | |||
| - | journalctl -e _COMM=' | ||
| - | |||
| - | gio open ~/' | ||
| - | |||
| - | ====== Verify DRI3 ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | LIBGL_DEBUG=' | ||
| - | |||
| - | ====== GpuTest ====== | ||
| - | |||
| - | * https:// | ||
| - | |||
| - | ===== Execute ===== | ||
| - | |||
| - | ==== HDTV ==== | ||
| - | |||
| - | * 1280x720 | ||
| - | |||
| - | wget -O '/ | ||
| - | |||
| - | cd '/ | ||
| - | |||
| - | /fullscreen /benchmark / | ||
| - | |||
| - | === NVIDIA Optimus === | ||
| - | |||
| - | **** | ||
| - | |||
| - | wget -O '/ | ||
| - | |||
| - | ==== FHD ==== | ||
| - | |||
| - | * 1920x1080 | ||
| - | |||
| - | wget -O '/ | ||
| - | |||
| - | cd '/ | ||
| - | |||
| - | /fullscreen /benchmark / | ||
| - | |||
| - | ==== UHDTV1 ==== | ||
| - | |||
| - | * 3840x2160 | ||
| - | |||
| - | wget -O '/ | ||
| - | |||
| - | cd '/ | ||
| - | |||
| - | /fullscreen /benchmark / | ||
| - | |||
| - | ==== Cleanup ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | rm -Rf '/ | ||
| - | |||
| - | ====== Show Sensors ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | ====== Show CPU Frequency ====== | ||
| - | |||
| - | grep ' | ||
| - | |||
| - | watch --interval ' | ||
| - | |||
| - | ====== OpenSSL Supported Ciphers ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | openssl ciphers -v | awk ' | ||
| - | |||
| - | ====== Partition Information ====== | ||
| - | |||
| - | * Both commands present the same information | ||
| - | |||
| - | df -hT | ||
| - | |||
| - | df --human-readable --print-type | ||
| - | |||
| - | ====== Encryption Information ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo cryptsetup -v status '/ | ||
| - | |||
| - | ====== ATA Secure Erase ====== | ||
| - | |||
| - | * See [[notes: | ||
| - | |||
| - | ====== RAID ====== | ||
| - | |||
| - | ===== Controller Details ===== | ||
| - | |||
| - | * This can be used to get the OpROM version for Intel RST | ||
| - | |||
| - | sudo mdadm --detail-platform | ||
| - | |||
| - | ===== Create Software RAID ===== | ||
| - | |||
| - | ==== Fedora Anaconda ==== | ||
| - | |||
| - | * :!: https:// | ||
| - | * Compared to old notes, the RAID device needs to be under ''/ | ||
| - | * 2024/01: On the computer this was tested on ((Dell Latitude 5591)), it doesn' | ||
| - | |||
| - | sudo mdadm --create '/ | ||
| - | |||
| - | ==== Old ==== | ||
| - | |||
| - | * :?: Came from old notes; this used to work for an Acer Predator laptop that had 3 SSDs | ||
| - | |||
| - | sudo mdadm --create '/ | ||
| - | |||
| - | ====== Fix MacBook Battery CPU Throttling ====== | ||
| - | |||
| - | * 2023/07/17: This solves a MacBook Pro Mid-2010 with Intel C2D from being stuck at 1.5GHz CPU due to a missing internal battery, by unlocking full-performance | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | sudo wrmsr --all ' | ||
| - | |||
| - | ===== Verify ===== | ||
| - | |||
| - | * '' | ||
| - | |||
| - | sudo rdmsr --all ' | ||
| - | |||
| - | ====== VGA Switcheroo Power States ====== | ||
| - | |||
| - | * https:// | ||
| - | |||
| - | sudo cat '/ | ||
| - | |||
| - | ====== ACPI Tables ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo strings '/ | ||
| - | |||
| - | ===== Old Method ===== | ||
| - | |||
| - | * Provides more information as to what certain '' | ||
| - | * In '' | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | sudo cp --force '/ | ||
| - | |||
| - | cd ~ && iasl -d ~/' | ||
| - | |||
| - | gio open ~/' | ||
| - | |||
| - | sudo dnf remove ' | ||
| - | |||
| - | ====== Display EDID Info ====== | ||
| - | |||
| - | * https:// | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | monitor-edid | ||
| - | |||
| - | ====== Custom Resolutions ====== | ||
| - | |||
| - | ===== Generate Modeline ===== | ||
| - | |||
| - | * Use '' | ||
| - | * Syntax is '' | ||
| - | |||
| - | cvt ' | ||
| - | |||
| - | cvt --reduced ' | ||
| - | |||
| - | < | ||
| - | |||
| - | ===== Temporarily Apply ===== | ||
| - | |||
| - | * Changes are lost after reboot | ||
| - | * Values after '' | ||
| - | |||
| - | xrandr --newmode " | ||
| - | |||
| - | xrandr --addmode ' | ||
| - | |||
| - | xrandr --output ' | ||
| - | |||
| - | ===== Verify ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | xrandr --verbose | grep *current | ||
| - | |||
| - | ===== Permanently Apply ===== | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | < | ||
| - | Section " | ||
| - | Identifier | ||
| - | Modeline x | ||
| - | Option | ||
| - | EndSection</ | ||
| - | |||
| - | ====== Backlight ====== | ||
| - | |||
| - | * See [[notes: | ||
| - | |||
| - | ====== HT/SMT Information ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | grep -e " | ||
| - | |||
| - | ====== Optimal GCC compiler flags ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | gcc -v -E -x c -march=native -mtune=native - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+// | ||
| - | |||
| - | ====== Privacy ====== | ||
| - | |||
| - | ===== Clear Terminal History ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | history -cw | ||
| - | |||
| - | ===== Create 7z Password Archive ===== | ||
| - | |||
| - | * Change '' | ||
| - | * Change '' | ||
| - | * Change '' | ||
| - | |||
| - | 7za a ' | ||
| - | |||
| - | 7za a ' | ||
| - | |||
| - | ===== oathtool ===== | ||
| - | |||
| - | * '' | ||
| - | |||
| - | sudo apt install ' | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | oathtool --totp -b ' | ||
| - | |||
| - | ===== Remove EXIF data ===== | ||
| - | |||
| - | sudo apt install ' | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | |||
| - | exiftool -all= *.* -overwrite_original | ||
/srv/www/wiki/data/attic/notes/misc_linux.1706113422.txt.gz · Last modified: (external edit)
