Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| linux:start [2026/04/26 15:37] – [apt and dpkg] mh | linux:start [2026/04/26 22:17] (current) – mh | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| -**[[linux: | -**[[linux: | ||
| -**[[linux: | -**[[linux: | ||
| + | |||
| + | ====== System & Diagnostics ====== | ||
| + | |||
| + | ===== Logs ===== | ||
| + | |||
| + | Common system logs: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | View recent entries: | ||
| + | |||
| + | <code bash> | ||
| + | tail -f / | ||
| + | </ | ||
| + | |||
| + | List recently modified log files: | ||
| + | |||
| + | <code bash> | ||
| + | ls -lt /var/log | ||
| + | </ | ||
| + | |||
| + | <WRAP info> | ||
| + | **Notes:** | ||
| + | |||
| + | * '' | ||
| + | * On systemd systems, '' | ||
| + | </ | ||
| + | |||
| + | ===== System information ===== | ||
| + | |||
| + | === General overview: === | ||
| + | |||
| + | <code bash> | ||
| + | inxi -F | ||
| + | </ | ||
| + | |||
| + | === Distribution: | ||
| + | |||
| + | <code bash> | ||
| + | lsb_release -d | ||
| + | </ | ||
| + | |||
| + | === Kernel: === | ||
| + | |||
| + | <code bash> | ||
| + | uname -snrm | ||
| + | </ | ||
| + | |||
| + | Flags: | ||
| + | |||
| + | *'' | ||
| + | *'' | ||
| + | *'' | ||
| + | *'' | ||
| + | |||
| + | |||
| + | === CPU: === | ||
| + | |||
| + | <code bash> | ||
| + | lscpu | ||
| + | cat / | ||
| + | </ | ||
| + | |||
| + | === Memory: === | ||
| + | |||
| + | <code bash> | ||
| + | free -h | ||
| + | </ | ||
| + | |||
| + | === Mounted filesystems: | ||
| + | |||
| + | <code bash> | ||
| + | df -h | ||
| + | </ | ||
| + | |||
| + | === Kernel modules: === | ||
| + | |||
| + | <code bash> | ||
| + | lsmod | ||
| + | </ | ||
| + | |||
| + | === Bash history: === | ||
| + | |||
| + | <code bash> | ||
| + | history | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Diagnostics ===== | ||
| + | |||
| + | <code bash> | ||
| + | uptime | ||
| + | dmesg -T | tail # recent kernel messages | ||
| + | vmstat 1 # system performance | ||
| + | mpstat -P ALL 1 # CPU usage per core | ||
| + | pidstat | ||
| + | free -h # memory usage | ||
| + | </ | ||
| + | |||
| + | |||
| + | ====== Storage & Filesystems ====== | ||
| + | |||
| + | ===== Mounting ===== | ||
| + | |||
| + | === List mounts: === | ||
| + | |||
| + | <code bash> | ||
| + | findmnt | ||
| + | </ | ||
| + | |||
| + | === List disks: === | ||
| + | |||
| + | <code bash> | ||
| + | lsblk | ||
| + | </ | ||
| + | |||
| + | === Mount: === | ||
| + | |||
| + | <code bash> | ||
| + | sudo mkdir -p / | ||
| + | sudo mount /dev/sdX# / | ||
| + | </ | ||
| + | |||
| + | === Unmount: === | ||
| + | |||
| + | <code bash> | ||
| + | sudo umount / | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Samba ==== | ||
| + | |||
| + | Manage service: | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl start smbd | ||
| + | sudo systemctl stop smbd | ||
| + | sudo systemctl restart smbd | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Mount/ | ||
| + | |||
| + | If an NTFS volume mounts as read-only, it is usually due to an unclean shutdown or filesystem inconsistency. | ||
| + | |||
| + | Attempt repair: | ||
| + | |||
| + | <code bash> | ||
| + | sudo ntfsfix /dev/sdX# | ||
| + | </ | ||
| + | |||
| + | Then remount: | ||
| + | |||
| + | <code bash> | ||
| + | sudo mount -t ntfs3 /dev/sdX# /mnt/ntfs | ||
| + | </ | ||
| + | |||
| + | Create mount point if needed: | ||
| + | |||
| + | <code bash> | ||
| + | sudo mkdir -p /mnt/ntfs | ||
| + | </ | ||
| + | |||
| + | <WRAP info> | ||
| + | **Notes:** | ||
| + | |||
| + | * '' | ||
| + | * Full repair should be done from Windows using '' | ||
| + | * If the issue persists, ensure Windows Fast Startup is disabled | ||
| + | </ | ||
| + | |||
| + | ===== Repair FAT32 filesystem errors ===== | ||
| + | |||
| + | If a FAT32 filesystem mounts as read-only, it is often due to detected corruption. | ||
| + | |||
| + | Check kernel logs: | ||
| + | |||
| + | <code bash> | ||
| + | dmesg | ||
| + | </ | ||
| + | |||
| + | Typical errors: | ||
| + | |||
| + | <code bash> | ||
| + | FAT-fs (sdb1): error, corrupted directory (invalid entries) | ||
| + | FAT-fs (sdb1): Filesystem has been set read-only | ||
| + | FAT-fs (sdb1): error, invalid access to FAT | ||
| + | </ | ||
| + | |||
| + | Repair the filesystem: | ||
| + | |||
| + | <code bash> | ||
| + | sudo umount /dev/sdX# | ||
| + | sudo fsck.vfat -a -w /dev/sdX# | ||
| + | </ | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Note: Ensure the correct device is targeted before running '' | ||
| + | |||
| + | |||
| + | ====== File & Data Operations ====== | ||
| + | |||
| + | ===== Shell toolbox ===== | ||
| + | |||
| + | ==== File operations ==== | ||
| + | |||
| + | === Mass renaming === | ||
| + | |||
| + | Uppercase .JPG to lowercase .jpg | ||
| + | |||
| + | <code bash> | ||
| + | for i in *.JPG; do mv " | ||
| + | </ | ||
| + | |||
| + | Alternative (rename tool): | ||
| + | |||
| + | <code bash> | ||
| + | rename ' | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Empty a file === | ||
| + | |||
| + | <code bash> | ||
| + | : > / | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Text processing ==== | ||
| + | |||
| + | === cut === | ||
| + | |||
| + | Extract part of a string: | ||
| + | |||
| + | <code bash> | ||
| + | date | cut -c17-24 | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Archives ==== | ||
| + | |||
| + | === tar === | ||
| + | |||
| + | <code bash> | ||
| + | # Extract | ||
| + | tar -xvf file.tar | ||
| + | tar -xvzf file.tar.gz | ||
| + | |||
| + | # Create | ||
| + | tar -cvf file.tar / | ||
| + | tar -cvzf file.tar.gz / | ||
| + | </ | ||
| + | |||
| + | Flags: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== User Environment ====== | ||
| ===== PATH ===== | ===== PATH ===== | ||
| Line 214: | Line 488: | ||
| </ | </ | ||
| - | ===== Repair FAT32 filesystem errors | + | ===== Video playback (minimal UI) ===== |
| - | If a FAT32 filesystem mounts as read-only, it is often due to detected corruption. | + | ==== mpv (recommended) ==== |
| - | Check kernel logs: | + | Lightweight video player with minimal UI, suitable for clean output on external displays. |
| + | |||
| + | Example: | ||
| <code bash> | <code bash> | ||
| - | dmesg | + | mpv --fs --no-border --ontop --geometry=+3200 --osd-level=0 video.mp4 |
| </ | </ | ||
| - | Typical errors: | + | Common options: |
| - | < | + | < |
| - | FAT-fs (sdb1): error, corrupted directory (invalid entries) | + | --fs # fullscreen |
| - | FAT-fs (sdb1): Filesystem has been set read-only | + | --no-border |
| - | FAT-fs (sdb1): error, invalid access to FAT | + | --ontop |
| + | --geometry=+X+Y # window position | ||
| + | --osd-level=0 | ||
| </ | </ | ||
| - | Repair the filesystem: | + | Configuration file: |
| - | < | + | < |
| - | sudo umount | + | ~/.config/mpv/mpv.conf |
| - | sudo fsck.vfat -a -w /dev/sdX# | + | |
| </ | </ | ||
| - | * '' | + | ---- |
| - | * '' | + | |
| - | Note: Ensure the correct device is targeted before running '' | + | ==== mplayer (legacy) ==== |
| + | Legacy setup kept for reference. | ||
| + | |||
| + | Configuration files: | ||
| + | |||
| + | */ | ||
| + | *~/ | ||
| + | *~/ | ||
| + | *~/ | ||
| + | |||
| + | Example options: | ||
| + | |||
| + | < | ||
| + | fs=yes | ||
| + | noborder=yes | ||
| + | ontop=yes | ||
| + | geometry=+3200 | ||
| + | osdlevel=0 | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ====== Specialized & Recovery ====== | ||
| ===== Data recovery ===== | ===== Data recovery ===== | ||
| Line 281: | Line 579: | ||
| Note: This is a recovery attempt, not a guaranteed repair method. For valuable data, stop using the disk immediately and clone/image it before experimenting. | Note: This is a recovery attempt, not a guaranteed repair method. For valuable data, stop using the disk immediately and clone/image it before experimenting. | ||
| - | ===== Mount/ | ||
| - | If an NTFS volume mounts as read-only, it is usually due to an unclean shutdown or filesystem inconsistency. | ||
| - | |||
| - | Attempt repair: | ||
| - | |||
| - | <code bash> | ||
| - | sudo ntfsfix /dev/sdX# | ||
| - | </ | ||
| - | |||
| - | Then remount: | ||
| - | |||
| - | <code bash> | ||
| - | sudo mount -t ntfs3 /dev/sdX# /mnt/ntfs | ||
| - | </ | ||
| - | |||
| - | Create mount point if needed: | ||
| - | |||
| - | <code bash> | ||
| - | sudo mkdir -p /mnt/ntfs | ||
| - | </ | ||
| - | |||
| - | <WRAP info> | ||
| - | **Notes:** | ||
| - | |||
| - | * '' | ||
| - | * Full repair should be done from Windows using '' | ||
| - | * If the issue persists, ensure Windows Fast Startup is disabled | ||
| - | </ | ||
| - | |||
| - | ===== Video playback (minimal UI) ===== | ||
| - | |||
| - | ==== mpv (recommended) ==== | ||
| - | |||
| - | Lightweight video player with minimal UI, suitable for clean output on external displays. | ||
| - | |||
| - | Example: | ||
| - | |||
| - | <code bash> | ||
| - | mpv --fs --no-border --ontop --geometry=+3200 --osd-level=0 video.mp4 | ||
| - | </ | ||
| - | |||
| - | Common options: | ||
| - | |||
| - | < | ||
| - | --fs # fullscreen | ||
| - | --no-border | ||
| - | --ontop | ||
| - | --geometry=+X+Y # window position (multi-display setups) | ||
| - | --osd-level=0 | ||
| - | </ | ||
| - | |||
| - | Configuration file: | ||
| - | |||
| - | < | ||
| - | ~/ | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== mplayer (legacy) ==== | ||
| - | |||
| - | Legacy setup kept for reference. | ||
| - | |||
| - | Configuration files: | ||
| - | |||
| - | */ | ||
| - | *~/ | ||
| - | *~/ | ||
| - | *~/ | ||
| - | |||
| - | Example options: | ||
| - | |||
| - | < | ||
| - | fs=yes | ||
| - | noborder=yes | ||
| - | ontop=yes | ||
| - | geometry=+3200 | ||
| - | osdlevel=0 | ||
| - | </ | ||
| ===== Using Apple USB SuperDrive ===== | ===== Using Apple USB SuperDrive ===== | ||
| Line 566: | Line 785: | ||
| </ | </ | ||
| - | ===== Shell toolbox ===== | ||
| - | ==== File operations ==== | ||
| - | === Mass renaming === | ||
| - | Uppercase .JPG to lowercase .jpg | ||
| - | |||
| - | <code bash> | ||
| - | for i in *.JPG; do mv " | ||
| - | </ | ||
| - | |||
| - | Alternative (rename tool): | ||
| - | |||
| - | <code bash> | ||
| - | rename ' | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | === Empty a file === | ||
| - | |||
| - | <code bash> | ||
| - | : > / | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Text processing ==== | ||
| - | |||
| - | === cut === | ||
| - | |||
| - | Extract part of a string: | ||
| - | |||
| - | <code bash> | ||
| - | date | cut -c17-24 | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Archives ==== | ||
| - | |||
| - | === tar === | ||
| - | |||
| - | <code bash> | ||
| - | # Extract | ||
| - | tar -xvf file.tar | ||
| - | tar -xvzf file.tar.gz | ||
| - | |||
| - | # Create | ||
| - | tar -cvf file.tar / | ||
| - | tar -cvzf file.tar.gz / | ||
| - | </ | ||
| - | |||
| - | Flags: | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Mounting ==== | ||
| - | |||
| - | List mounts: | ||
| - | |||
| - | <code bash> | ||
| - | findmnt | ||
| - | </ | ||
| - | |||
| - | List disks: | ||
| - | |||
| - | <code bash> | ||
| - | lsblk | ||
| - | </ | ||
| - | |||
| - | Mount: | ||
| - | |||
| - | <code bash> | ||
| - | sudo mkdir -p / | ||
| - | sudo mount /dev/sdX# / | ||
| - | </ | ||
| - | |||
| - | Unmount: | ||
| - | |||
| - | <code bash> | ||
| - | sudo umount / | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Samba ==== | ||
| - | |||
| - | Manage service: | ||
| - | |||
| - | <code bash> | ||
| - | sudo systemctl start smbd | ||
| - | sudo systemctl stop smbd | ||
| - | sudo systemctl restart smbd | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| ==== Package management ==== | ==== Package management ==== | ||
| Line 682: | Line 800: | ||
| ---- | ---- | ||
| - | ==== System information ==== | ||
| - | |||
| - | General overview: | ||
| - | |||
| - | <code bash> | ||
| - | inxi -F | ||
| - | </ | ||
| - | |||
| - | Distribution: | ||
| - | |||
| - | <code bash> | ||
| - | lsb_release -d | ||
| - | </ | ||
| - | |||
| - | Kernel: | ||
| - | |||
| - | <code bash> | ||
| - | uname -snrm | ||
| - | </ | ||
| - | |||
| - | CPU: | ||
| - | |||
| - | <code bash> | ||
| - | lscpu | ||
| - | cat / | ||
| - | </ | ||
| - | |||
| - | Memory: | ||
| - | |||
| - | <code bash> | ||
| - | free -h | ||
| - | </ | ||
| - | |||
| - | Mounted filesystems: | ||
| - | |||
| - | <code bash> | ||
| - | df -h | ||
| - | </ | ||
| - | |||
| - | Kernel modules: | ||
| - | |||
| - | <code bash> | ||
| - | lsmod | ||
| - | </ | ||
| - | |||
| - | Bash history: | ||
| - | |||
| - | <code bash> | ||
| - | history | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Diagnostics ==== | ||
| - | |||
| - | <code bash> | ||
| - | uptime | ||
| - | dmesg -T | tail # recent kernel messages | ||
| - | vmstat 1 # system performance | ||
| - | mpstat -P ALL 1 # CPU usage per core | ||
| - | pidstat | ||
| - | free -h # memory usage | ||
| - | </ | ||
| - | ====== Legacy ====== | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ===== List info ===== | ||
| - | |||
| - | === Display all information === | ||
| - | |||
| - | <code bash> | ||
| - | $ inxi -F | ||
| - | </ | ||
| - | //Read the manual, inxi is a very powerful tool to quickly get an overview of a full hardware setup// | ||
| - | |||
| - | === Distrib === | ||
| - | <code bash> | ||
| - | $ lsb_release -d | ||
| - | </ | ||
| - | |||
| - | === CPU === | ||
| - | Basic | ||
| - | <code bash> | ||
| - | $ lscpu | ||
| - | </ | ||
| - | Detailed, core-specific information, | ||
| - | <code bash> | ||
| - | $ cat / | ||
| - | </ | ||
| - | |||
| - | On Macs : | ||
| - | <code bash> | ||
| - | $ sysctl -n machdep.cpu.brand_string | ||
| - | </ | ||
| - | |||
| - | === Mounted devices === | ||
| - | <code bash> | ||
| - | $ df -h | ||
| - | </ | ||
| - | |||
| - | === Kernel === | ||
| - | <code bash> | ||
| - | $ uname -snrm | ||
| - | </ | ||
| - | *s : kernel name | ||
| - | *n : network node hostname | ||
| - | *r : kernel relase number | ||
| - | *m : machine hardware name | ||
| - | |||
| - | [[ http:// | ||
| - | |||
| - | === Kernel modules === | ||
| - | <code bash> | ||
| - | $ lsmod | ||
| - | </ | ||
| - | |||
| - | === Bash history === | ||
| - | <code bash> | ||
| - | $ history | ||
| - | </ | ||
| - | |||
| - | === D-Bus/ | ||
| - | <code bash> | ||
| - | $ gdbus | ||
| - | $ g-feet //gui history | ||
| - | </ | ||
| - | |||
| - | |||
| - | === Motherboard information === | ||
| - | <code bash> | ||
| - | $ sudo dmidecode | grep -A3 ‘^System Information’ | ||
| - | </ | ||
| - | //dmidecode spurns out a lot of information if you want to query your system// | ||
| - | |||
| - | === Diagnostics & Tools === | ||
| - | |||
| - | <code bash> | ||
| - | $ uptime [load Average] | ||
| - | $ dmesg -T | tail [Kernel errors] | ||
| - | $ vmstat 1 [Virtual memory and detailed information] | ||
| - | $ mpstat -P ALL 1 [CPU state] | ||
| - | $ pidstat [processes] | ||
| - | $ free -m [memory] | ||
| - | $ atop [main overview] | ||
| - | </ | ||
| - | |||
| - | |||
| - | ===== Debug & Logs ===== | ||
| - | |||
| - | ''/ | ||
| - | |||
| - | Check in ''/ | ||
| - | |||
| - | <code bash> | ||
| - | $ls -lart //inverted sorted by time. Last entry is latest modified | ||
| - | </ | ||
| - | ===== Misc Ressources ===== | + | ===== Additional |
| - | *[[https:// | + | |
| - | *[[https:// | + | |
| - | *[[https:// | + | |