Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| linux:start [2021/02/10 12:49] – [Debug & Logs] mh | linux:start [2026/07/02 21:26] (current) – [File operations] mh | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Linux ====== | ====== Linux ====== | ||
| - | -[[linux:RBS|Razer Blade Stealth in Linux]] | + | -**[[linux:bash|Bash]]** |
| - | -[[linux: | + | -**[[linux: |
| - | -[[linux: | + | -**[[linux:eGPU|Razer Core eGPU]]** |
| - | -[[linux:bash|Bash]] | + | -**[[linux:RBS|Razer Blade Stealth in Linux]]** |
| - | -[[linux:sed|sed]] | + | |
| - | ===== PATH ===== | + | ====== System & Diagnostics ====== |
| - | <WRAP round info> | + | |
| - | PATH is the // | + | |
| - | </ | + | |
| - | <code bash> | + | |
| - | #print user PATH | + | |
| - | $ printenv PATH | + | |
| - | / | + | |
| - | $ echo " | + | |
| - | / | + | |
| - | #How it works | + | ===== Logs ===== |
| - | $ ping 127.0.0.1 | + | |
| - | PATH=/bin:/ | + | Common system logs: |
| - | | + | |
| - | | + | |
| - | | + | |
| - | #Add a folder to path for current shell session | + | < |
| - | $ PATH=$PATH:/path/to/app/folder | + | /var/log/syslog |
| </ | </ | ||
| - | ==== Local installs of binaries and PATH correction ==== | + | View recent entries: |
| - | === Install the binary === | + | <code bash> |
| + | tail -f / | ||
| + | </ | ||
| - | There is debate as to where binaries that you install yourself should be put in the filesystem. The proper places to put them seem to be : | + | List recently modified log files: |
| - | < | + | < |
| - | /opt/ <- for bundled applications, | + | ls -lt /var/log |
| - | /usr/local/ <- for applications built by the administrator for local use, i.e. using " | + | |
| - | / | + | |
| </ | </ | ||
| - | [[http:// | ||
| - | === Add it to the user's PATH === | ||
| - | Include the following line in /home/ | + | <WRAP info> |
| + | **Notes: | ||
| + | |||
| + | * '' | ||
| + | * On systemd systems, '' | ||
| + | </WRAP> | ||
| + | |||
| + | ===== System information ===== | ||
| + | |||
| + | === General overview: === | ||
| <code bash> | <code bash> | ||
| - | EXPORT PATH="/ | + | inxi -F |
| </ | </ | ||
| - | This will only be active **after logging out**. If you want to activate it without logging out for a current shell session run the following command | + | === Distribution: === |
| <code bash> | <code bash> | ||
| - | $ source / | + | lsb_release -d |
| </ | </ | ||
| - | //Note that the path must point to the **folder containing** the binary and not to the binary itself.// | + | === Kernel: === |
| + | |||
| + | <code bash> | ||
| + | uname -snrm | ||
| + | </code> | ||
| + | |||
| + | Flags: | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| - | === Add it to cinnammon start menu === | ||
| - | Cinnammon has implemented a handy GUI Editor you can access by right-clicking the ' | + | === CPU: === |
| <code bash> | <code bash> | ||
| - | $ cinnamon-menu-editor | + | lscpu |
| + | cat / | ||
| </ | </ | ||
| - | Using bash you can create a symbolic link to a .desktop file anywhere on your system and place that link in / | + | === Memory: === |
| <code bash> | <code bash> | ||
| - | $ ln -s path/ | + | free -h |
| </ | </ | ||
| - | Make sure the .desktop file has proper permissions | + | === Mounted filesystems: === |
| <code bash> | <code bash> | ||
| - | $ chmod 644 path/ | + | df -h |
| </ | </ | ||
| - | The menu entry will appear after logging out. | + | === Kernel modules: === |
| - | === Locate a binary | + | <code bash> |
| + | lsmod | ||
| + | </ | ||
| + | |||
| + | === Bash history: | ||
| <code bash> | <code bash> | ||
| - | $ type man | + | history |
| - | man is / | + | |
| </ | </ | ||
| + | |||
| ---- | ---- | ||
| - | ===== AppImages | + | ===== Diagnostics |
| - | Extract the content of an AppImage : | + | <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 | ||
| + | </ | ||
| - | ./ | ||
| - | This is useful if you want to get the Icon. | + | ====== Storage & Filesystems ====== |
| - | [[https:// | + | ===== Mounting ===== |
| - | ---- | + | |
| - | ===== Grub ===== | + | === List mounts: |
| - | Config file is located at '' | + | <code bash> |
| + | findmnt | ||
| + | </code> | ||
| - | The line for a splash image is '' | + | === List disks: === |
| + | |||
| + | <code bash> | ||
| + | lsblk | ||
| + | </ | ||
| + | |||
| + | === Mount: === | ||
| + | |||
| + | <code bash> | ||
| + | sudo mkdir -p / | ||
| + | sudo mount /dev/sdX# / | ||
| + | </ | ||
| + | |||
| + | === Unmount: === | ||
| + | |||
| + | <code bash> | ||
| + | sudo umount | ||
| + | </code> | ||
| ---- | ---- | ||
| - | ===== Limit CPU usage ===== | ||
| - | There are various ways to limit the CPU usage of a process. One simple way is using '' | + | ==== Samba ==== |
| + | |||
| + | Manage service: | ||
| <code bash> | <code bash> | ||
| - | $ cpulimit -P / | + | sudo systemctl start smbd |
| + | sudo systemctl stop smbd | ||
| + | sudo systemctl restart smbd | ||
| </ | </ | ||
| - | [[https:// | ||
| ---- | ---- | ||
| - | ===== Fonts install (bash) ===== | ||
| - | To quickly install folders containing many OpenType fonts (OTF) or TrueType fonts (TTF), copy to the following locations | + | ===== Mount/ |
| + | |||
| + | If an NTFS volume mounts as read-only, it is usually due to an unclean shutdown or filesystem inconsistency. | ||
| + | |||
| + | Attempt repair: | ||
| <code bash> | <code bash> | ||
| - | $ sudo cp -r /path/ | + | sudo ntfsfix |
| - | $ sudo cp -r / | + | |
| </ | </ | ||
| - | Regenerate font cache : | + | Then remount: |
| <code bash> | <code bash> | ||
| - | $ sudo fc-cache -f -v | + | sudo mount -t ntfs3 /dev/sdX# /mnt/ntfs |
| </ | </ | ||
| - | **Note :** This will install fonts system-wide. To install for a single user only copy the files to : | + | Create mount point if needed: |
| - | < | + | < |
| - | ~/.fonts/ | + | sudo mkdir -p /mnt/ntfs |
| - | </ | + | </ |
| - | and regenerate font cache. | + | <WRAP info> |
| + | **Notes:** | ||
| - | ===== Manipulate pdf ===== | + | * '' |
| + | * Full repair should be done from Windows using '' | ||
| + | * If the issue persists, ensure Windows Fast Startup is disabled | ||
| + | </ | ||
| - | ==== Modifying page order ==== | + | ===== Repair FAT32 filesystem errors ===== |
| - | Use (< | + | If a FAT32 filesystem mounts as read-only, it is often due to detected corruption. |
| + | |||
| + | Check kernel logs: | ||
| - | //For example to extract two pages out of a pdf// | ||
| <code bash> | <code bash> | ||
| - | $ pdf-stapler cat in.pdf 2-3 out.pdf | + | dmesg |
| </ | </ | ||
| - | Old syntax with pdftk : < | ||
| - | === Ubuntu and derivatives === | + | Typical errors: |
| - | pdfshuffler is a front end for python-pyPdf and a great tool for merging or splitting pdf files with a GUI. | + | <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 | ||
| + | </ | ||
| - | ==== Reducing PDF size ==== | + | Repair |
| - | + | ||
| - | Found from [[https:// | + | |
| - | this answer]] on AskUbuntu | + | |
| <code bash> | <code bash> | ||
| - | gs -sDEVICE=pdfwrite | + | sudo umount /dev/sdX# |
| + | sudo fsck.vfat | ||
| </ | </ | ||
| - | '' | + | * '' |
| + | * '' | ||
| - | *'' | + | Note: Ensure the correct device is targeted before running |
| - | *''/ | + | |
| - | *''/ | + | |
| - | *''/ | + | |
| - | *''/ | + | |
| + | ====== File & Data Operations ====== | ||
| + | ===== Shell toolbox ===== | ||
| + | ==== File operations ==== | ||
| - | ===== Repair FAT32 FS errors ===== | + | === Mass renaming |
| - | When FAT32 filesystems mount in read-only it's often related to corrupted filesystem. | + | __**Changing an extension: |
| - | Run **dmesg** to check. If you see lines such as : | + | <code bash> |
| + | for i in *.JPG; do mv " | ||
| + | </ | ||
| + | |||
| + | __**Changing a prefix:**__ | ||
| <code bash> | <code bash> | ||
| - | [54259.098330] FAT-fs (sdb1): error, corrupted directory (invalid entries) | + | for i in " |
| - | [54259.098338] FAT-fs (sdb1): Filesystem has been set read-only | + | |
| - | [54304.610623] FAT-fs (sdb1): error, corrupted directory (invalid entries) | + | done |
| - | [54304.690012] FAT-fs (sdb1): error, invalid access to FAT (entry 0xf7d0f91e) | + | |
| - | [54304.690213] FAT-fs (sdb1): error, invalid access to FAT (entry 0xff27ff23) | + | |
| - | [54304.690314] FAT-fs (sdb1): error, invalid access to FAT (entry 0xff0dff13) | + | |
| </ | </ | ||
| - | Run the following command | + | * ''" |
| + | * '' | ||
| + | * In Bash parameter expansion, the ''#'' | ||
| + | * '' | ||
| + | * '' | ||
| + | * ''" | ||
| + | |||
| + | __**Alternative (rename tool):**__ | ||
| <code bash> | <code bash> | ||
| - | $ sudo umount | + | rename 's/\.JPG$/.jpg/' *.JPG |
| - | $ sudo fsck.msdos -aw /dev/sdX# | + | |
| </ | </ | ||
| - | //[[https:// | + | * Use the '' |
| - | + | * Use '' | |
| + | * On Linux Mint / Ubuntu, '' | ||
| + | * The '' | ||
| + | * For safety, preview first with '' | ||
| - | ===== Data Recovery ===== | + | ---- |
| - | Try [[https:// | + | |
| - | === For .mov === | + | === Empty a file === |
| - | //PhotoRec 7.1-WIP// | + | |
| - | In FileOptsMenu check : | + | < |
| - | < | + | : > /path/to/file |
| - | [X] mov/mdat Recover mdat atom as a separate | + | |
| </ | </ | ||
| - | Two files are created for every .mov recovered. Concatenate with : | + | |
| - | < | + | ---- |
| - | cat f123_ftyp.mov f456_mdat.mov > 1.mov | + | |
| - | cat f456_mdat.mov f123_ftyp.mov > 2.mov | + | ==== Text processing ==== |
| + | |||
| + | === cut === | ||
| + | |||
| + | Extract part of a string: | ||
| + | |||
| + | < | ||
| + | date | cut -c17-24 | ||
| </ | </ | ||
| - | One of the two files will be good. Sometimes one file is .mp4 and the other is .mov : | + | |
| - | < | + | ---- |
| - | cat f54114560.mp4 f51781632_mdat.mov > 1.mov | + | |
| + | ==== 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: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| - | ===== Mount NTFS ===== | + | ---- |
| - | If a NTFS volume mounts in read-only, remount using : | + | ====== User Environment ====== |
| + | |||
| + | ===== PATH ===== | ||
| + | <WRAP round info> | ||
| + | PATH is the // | ||
| + | </ | ||
| <code bash> | <code bash> | ||
| - | $ su | + | # Print PATH |
| - | $ mkdir /mnt/ntfs | + | printenv PATH |
| - | $ mount -t ntfs /dev/sd[X] /mnt/ntfs | + | echo "$PATH" |
| - | </ | + | |
| + | # Example resolution | ||
| + | ping 127.0.0.1 | ||
| - | ===== mplayer ===== | + | PATH=/ |
| + | | ||
| + | | ||
| + | | ||
| - | ==== Configuration Files ==== | + | # Add a folder to PATH (current session only) |
| - | === Global === | + | PATH=$PATH:/ |
| + | </ | ||
| - | */ | + | ==== Local installs of binaries and PATH ==== |
| - | === Local === | + | === Install locations |
| - | *~/ | + | Common locations for manually installed binaries: |
| - | *~/ | + | |
| - | *~/ | + | |
| - | ==== Common Options ==== | ||
| < | < | ||
| - | fs=yes | + | /opt/ # bundled applications |
| - | noborder=yes | + | / |
| - | ontop=yes | + | ~/ |
| - | geometry=+3200 | + | / |
| - | osdlevel=0 | + | |
| </ | </ | ||
| - | ===== Using Apple USB SuperDrive ===== | ||
| - | === Required packages | + | [[http:// |
| - | < | + | |
| - | sg3-utils | + | === Add to PATH === |
| + | |||
| + | Add to '' | ||
| + | |||
| + | < | ||
| + | export PATH="/ | ||
| </ | </ | ||
| - | === Find USB Drive === | + | Apply without logout: |
| - | (usually sr0 or sr1) | + | |
| <code bash> | <code bash> | ||
| - | $ ls /dev | grep ' | + | source ~/.profile |
| </ | </ | ||
| - | === Send activation byte sequence | + | Note: PATH must point to the **directory**, |
| - | (change sr0 accordingly if needed) | + | |
| + | === Locate a binary | ||
| <code bash> | <code bash> | ||
| - | $ sg_raw | + | type man |
| + | # man is /usr/bin/man | ||
| </ | </ | ||
| - | ===== QCAD Tutorial removal ===== | + | ---- |
| - | This is not specifically linux-related but since every time I install it (especially on MacOS systems) it's such a pain to find the plugins/ folder from where to remove the plugins blocking the trial version of QCAD here's an easy way to find them : | + | ===== AppImages ===== |
| - | Go to Help > About > Plugins and just click on the name of one of the plugins. | + | Run an AppImage: |
| - | In MacOS it will be QCAD > About > Plugins instead. | + | <code bash> |
| + | chmod +x example.AppImage | ||
| + | ./ | ||
| + | </ | ||
| - | ===== LAMPP Local Server ===== | + | Some support automatic install: |
| - | Start stop the server using : | + | < |
| - | < | + | ./example.AppImage --install |
| - | sudo / | + | |
| </ | </ | ||
| - | Put your sites and data in : | + | Manual extraction: |
| - | < | + | |
| - | /opt/ | + | < |
| + | ./your.AppImage --appimage-extract | ||
| </ | </ | ||
| - | ===== Fixes ===== | + | === Tools === |
| + | |||
| + | * AppImageLauncher → integrates AppImages into the system (recommended) | ||
| + | * AppImage Daemon → older alternative | ||
| + | |||
| + | ==== Add application to Cinnamon menu ==== | ||
| + | |||
| + | Launch menu editor: | ||
| + | |||
| + | <code bash> | ||
| + | cinnamon-menu-editor | ||
| + | </ | ||
| + | |||
| + | === Manual method === | ||
| + | |||
| + | User-level entries: | ||
| - | ==== Wired network doesn' | ||
| - | Identify your wired interface card module. Realtek 8169 is known to have this issue with some kernels. | ||
| < | < | ||
| - | $ lsmod | + | ~/ |
| </ | </ | ||
| - | Look for : | + | |
| + | Place or create a '' | ||
| + | |||
| + | Example minimal file: | ||
| < | < | ||
| - | .... | + | [Desktop Entry] |
| - | hid | + | Name=My App |
| - | ahci | + | Exec=/ |
| - | r8169 86016 0 | + | Type=Application |
| - | libahci | + | Terminal=false |
| - | mii 16384 1 r8169 | + | |
| - | ... | + | |
| </ | </ | ||
| - | Edit (create if it doesn' | + | |
| + | The entry should appear automatically in the menu. | ||
| + | |||
| + | <WRAP info> | ||
| + | **Note:** Avoid using ''/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== GRUB ===== | ||
| + | |||
| + | Config | ||
| < | < | ||
| - | $nano /etc/pm/config.d/ | + | /etc/default/grub |
| </ | </ | ||
| - | Append the following line : | + | |
| + | Line for background image: | ||
| < | < | ||
| - | SUSPEND_MODULES=" | + | GRUB_BACKGROUND=/ |
| </ | </ | ||
| - | Replace module name if necessary | ||
| - | //Note to self : Added " | + | ---- |
| - | ===== Linux Screencast tools ===== | + | ===== Limit CPU usage ===== |
| - | ***Kazam | + | Using '' |
| - | *gtk-recordmydesktop | + | |
| - | *vokoscreen | + | |
| - | *simplescreenrecorder | + | |
| - | *add-apt-repository ppa: | + | |
| - | ===== Open VPN ===== | + | <code bash> |
| + | cpulimit -P / | ||
| + | </ | ||
| - | === Connecting a client to a remote server === | + | ---- |
| - | //This requires a valid .ovpn file// | + | |
| + | ===== Fonts install ===== | ||
| - | < | + | System-wide: |
| - | openvpn | + | |
| + | < | ||
| + | sudo cp -r /path/to/fonts / | ||
| + | sudo fc-cache -f -v | ||
| </ | </ | ||
| - | [[https:// | + | User-only: |
| - | === Connecting to shared folders through openvpn === | + | < |
| - | //This requires the ip of the shared folders location// | + | ~/.local/share/fonts/ |
| + | </ | ||
| - | ===== Samba tips ===== | + | Then refresh cache: |
| - | === List available shares on a given host === | ||
| - | Replace host with the hostname or IP address of the server running samba shares | ||
| <code bash> | <code bash> | ||
| - | $ smbclient | + | $ sudo fc-cache -f -v |
| </ | </ | ||
| - | Output will be something like this | + | ---- |
| - | < | + | |
| - | Sharename | + | |
| - | --------- | + | |
| - | home Disk | + | |
| - | shares | + | |
| - | users | + | |
| - | IPC$ IPC IPC Service () | + | |
| - | Reconnecting with SMB1 for workgroup listing. | + | ===== PDF manipulation ===== |
| - | Server | + | ==== Reorder / split / merge ==== |
| - | --------- | + | |
| - | Workgroup | + | CLI: |
| - | --------- | + | |
| - | MY_WORK | + | <code bash> |
| + | pdf-stapler cat in.pdf 2-3 out.pdf | ||
| </ | </ | ||
| - | [[https:// | + | GUI (recommended): |
| - | === Locate mount points | + | * pdfarranger → lightweight, |
| + | |||
| + | ==== Reducing PDF size ==== | ||
| - | Most of the time they are located at ''/ | ||
| - | ===== Alias ===== | ||
| - | Create an alias using command | ||
| <code bash> | <code bash> | ||
| - | alias name=' | + | gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ |
| </ | </ | ||
| - | The alias is only in place while the user session is active. To make it permanent, write it in the '' | ||
| - | You can reload | + | '' |
| + | |||
| + | * ''/ | ||
| + | * ''/ | ||
| + | * ''/ | ||
| + | * ''/ | ||
| + | * ''/ | ||
| + | |||
| + | <WRAP info> | ||
| + | **Note:** Ghostscript rewrites | ||
| + | |||
| + | It often reduces | ||
| + | </ | ||
| + | |||
| + | ===== Video playback (minimal UI) ===== | ||
| + | |||
| + | ==== mpv (recommended) ==== | ||
| + | |||
| + | Lightweight video player with minimal UI, suitable for clean output on external displays. | ||
| + | |||
| + | Example: | ||
| <code bash> | <code bash> | ||
| - | $ source ~/.bashrc | + | mpv --fs --no-border --ontop --geometry=+3200 --osd-level=0 video.mp4 |
| - | #or | + | |
| - | $ . ~/.bashrc | + | |
| </ | </ | ||
| - | ===== Useful shell ===== | ||
| - | === Mass renaming files === | + | Common options: |
| - | [[https:// | + | < |
| - | You can use for commands in the shell or use the ' | + | --fs # fullscreen |
| + | --no-border | ||
| + | --ontop | ||
| + | --geometry=+X+Y # window position | ||
| + | --osd-level=0 | ||
| + | </ | ||
| - | < | + | Configuration file: |
| - | skx@lappy:~$ ls | + | |
| - | a.JPG b.JPG c.JPG d.JPG | + | < |
| - | skx@lappy: | + | ~/.config/mpv/mpv.conf |
| - | skx@lappy: | + | |
| - | a.jpg b.jpg c.jpg d.jpg | + | |
| </ | </ | ||
| + | |||
| ---- | ---- | ||
| - | === cut === | + | ==== mplayer (legacy) ==== |
| - | Remove sections from input and output them | + | |
| + | Legacy setup kept for reference. | ||
| + | |||
| + | Configuration files: | ||
| + | |||
| + | */ | ||
| + | *~/ | ||
| + | *~/ | ||
| + | *~/ | ||
| + | |||
| + | Example options: | ||
| + | |||
| + | < | ||
| + | fs=yes | ||
| + | noborder=yes | ||
| + | ontop=yes | ||
| + | geometry=+3200 | ||
| + | osdlevel=0 | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ====== Specialized & Recovery ====== | ||
| + | |||
| + | ===== Data recovery ===== | ||
| + | |||
| + | Use **TestDisk** / **PhotoRec** as a first recovery tool. | ||
| + | |||
| + | * **TestDisk** attempts partition repair | ||
| + | * **PhotoRec** performs file carving by signature. It can recover files from damaged filesystems, | ||
| + | |||
| + | Do not write recovered files to the source disk. | ||
| + | |||
| + | ==== PhotoRec: recovered MOV files ==== | ||
| + | |||
| + | For some recovered '' | ||
| + | |||
| + | In PhotoRec '' | ||
| + | |||
| + | < | ||
| + | [X] mov/mdat Recover mdat atom as a separate file | ||
| + | </ | ||
| + | |||
| + | Sort recovered files by name, then try concatenating matching parts: | ||
| <code bash> | <code bash> | ||
| - | $ date | + | cat f123_ftyp.mov f456_mdat.mov > recovered_1.mov |
| - | Thu 02 Jan 2020 08:20:10 PM CET | + | cat f456_mdat.mov f123_ftyp.mov > recovered_2.mov |
| - | $ date | cut -c17-24 | + | |
| - | 08:21:02 | + | |
| </ | </ | ||
| - | ---- | ||
| - | === Mount === | + | One order may produce a usable file. |
| - | Target disk | + | |
| + | Sometimes the header/ | ||
| <code bash> | <code bash> | ||
| - | $ sudo fdisk -l | + | cat f54114560.mp4 f51781632_mdat.mov > recovered.mov |
| - | Disk /dev/sda | + | |
| - | [...] | + | |
| - | Disk /dev/sdb | + | |
| - | [...] | + | |
| </ | </ | ||
| - | Create mount point | + | |
| + | 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. | ||
| + | |||
| + | |||
| + | |||
| + | ===== Using Apple USB SuperDrive ===== | ||
| + | |||
| + | The Apple USB SuperDrive requires a vendor-specific command to activate on non-Apple systems. | ||
| + | |||
| + | === Required package === | ||
| <code bash> | <code bash> | ||
| - | $ sudo mkdir / | + | sudo apt install sg3-utils |
| </ | </ | ||
| - | Mount device | + | |
| + | === Identify | ||
| + | |||
| + | Usually appears as ''/ | ||
| <code bash> | <code bash> | ||
| - | $ sudo mount /dev/sda1 / | + | lsblk |
| </ | </ | ||
| - | Unmount | + | |
| + | === Send activation command === | ||
| <code bash> | <code bash> | ||
| - | $ sudo umount | + | sudo sg_raw |
| </ | </ | ||
| - | [[https:// | ||
| - | ---- | ||
| - | === pwd === | + | The drive should become usable immediately after. |
| - | Display Present Working Directory | + | |
| + | <WRAP info> | ||
| + | **Note:** This command must be reissued after reconnecting the drive. | ||
| + | </ | ||
| + | |||
| + | ===== QCAD (plugin location) ===== | ||
| + | |||
| + | <WRAP center round alert 60%> | ||
| + | NOTE : MOVE TO BOTTOM ' | ||
| + | </ | ||
| + | |||
| + | |||
| + | To locate the QCAD plugin directory: | ||
| + | |||
| + | Go to: | ||
| + | * Help > About > Plugins (Linux / Windows) | ||
| + | * QCAD > About > Plugins (macOS) | ||
| + | |||
| + | Click on any plugin name to reveal its file location. | ||
| + | |||
| + | <WRAP info> | ||
| + | **Note:** Useful for locating and removing plugins related to trial limitations. | ||
| + | </ | ||
| + | |||
| + | ===== Screen recording ===== | ||
| + | |||
| + | ==== Recommended ==== | ||
| + | |||
| + | * **OBS Studio** → full-featured, | ||
| + | |||
| + | ==== Lightweight alternatives ==== | ||
| + | |||
| + | * simplescreenrecorder → lightweight, | ||
| + | * vokoscreenNG → simple GUI, good for quick recordings | ||
| + | |||
| + | ==== Notes ==== | ||
| + | |||
| + | * Older tools such as Kazam or gtk-recordmydesktop are largely unmaintained and may not work reliably on modern systems | ||
| + | * Wayland sessions may require OBS or desktop-native recording tools | ||
| + | |||
| + | ===== Samba ===== | ||
| + | |||
| + | ==== List available shares ==== | ||
| <code bash> | <code bash> | ||
| - | $ pwd | + | smbclient -L //host -U username |
| - | /home/pi | + | |
| </ | </ | ||
| + | |||
| + | * '' | ||
| + | * prompts for password | ||
| + | |||
| ---- | ---- | ||
| - | === tar === | + | ==== Access a share (temporary mount) ==== |
| - | Pack/Unpack tarball | + | |
| <code bash> | <code bash> | ||
| - | #All the following commands are verbose (-v) | + | sudo mount -t cifs // |
| - | $ tar -xvf file.tar #Unpack tar | + | </code> |
| - | $ tar -xvzf file.tar.gz #Unpack compressed (gzip) tar | + | |
| - | $ tar -cvf file.tar | + | Create mount point if needed: |
| - | $ tar -cvzf file.tar | + | |
| + | <code bash> | ||
| + | sudo mkdir -p /mnt/share | ||
| </ | </ | ||
| - | [[https:// | ||
| ---- | ---- | ||
| + | ==== GUI mounts (file manager) ==== | ||
| + | When mounting via a file manager (Nautilus, Nemo, etc.), shares are typically mounted under: | ||
| - | ===== List info ===== | + | < |
| + | / | ||
| + | </ | ||
| - | === Display all information | + | ---- |
| + | |||
| + | ==== Notes ==== | ||
| + | |||
| + | <WRAP info> | ||
| + | **Notes: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * SMB1 is deprecated and may be disabled on modern systems | ||
| + | </ | ||
| + | |||
| + | ===== Alias ===== | ||
| + | |||
| + | Create an alias: | ||
| <code bash> | <code bash> | ||
| - | $ inxi -F | + | alias name=' |
| </ | </ | ||
| - | //Read the manual, inxi is a very powerful tool to quickly get an overview of a full hardware setup// | ||
| - | === Distrib === | + | Example: |
| <code bash> | <code bash> | ||
| - | $ lsb_release | + | alias ll=' |
| </ | </ | ||
| - | === CPU === | + | Aliases are active for the current session only. |
| - | Basic | + | |
| - | < | + | To make them persistent, add them to: |
| - | $ lscpu | + | |
| + | < | ||
| + | ~/.bashrc | ||
| </ | </ | ||
| - | Detailed, core-specific information, | + | |
| + | Reload configuration: | ||
| <code bash> | <code bash> | ||
| - | $ cat /proc/cpuinfo | + | source ~/.bashrc |
| + | # or | ||
| + | . ~/.bashrc | ||
| </ | </ | ||
| - | === Mounted devices | + | ---- |
| + | |||
| + | ==== Manage aliases | ||
| + | |||
| + | List aliases: | ||
| <code bash> | <code bash> | ||
| - | $ df -h | + | alias |
| </ | </ | ||
| - | === Kernel === | + | Remove an alias: |
| <code bash> | <code bash> | ||
| - | $ uname -snrm | + | unalias name |
| </ | </ | ||
| - | *s : kernel name | ||
| - | *n : network node hostname | ||
| - | *r : kernel relase number | ||
| - | *m : machine hardware name | ||
| - | [[ http:// | + | ===== Mouse button mapping ===== |
| + | |||
| + | ==== X11 method (xbindkeys) ==== | ||
| + | |||
| + | Install tools: | ||
| - | === Kernel modules === | ||
| <code bash> | <code bash> | ||
| - | $ lsmod | + | sudo apt install xbindkeys xvkbd |
| </ | </ | ||
| - | === Bash history === | + | Identify button codes: |
| <code bash> | <code bash> | ||
| - | $ history | + | xev | grep button |
| </ | </ | ||
| - | === D-Bus/ | + | Create configuration: |
| <code bash> | <code bash> | ||
| - | $ gdbus | + | touch ~/.xbindkeysrc |
| - | $ g-feet | + | |
| </ | </ | ||
| + | Example: | ||
| - | === Motherboard information === | + | < |
| - | < | + | # Send Enter on mouse button 8 |
| - | $ sudo dmidecode | grep -A3 ‘^System Information’ | + | " |
| + | b:8 | ||
| </ | </ | ||
| - | //dmidecode spurns out a lot of information if you want to query your system// | ||
| - | === Diagnostics & Tools === | + | Start xbindkeys: |
| <code bash> | <code bash> | ||
| - | $ uptime [load Average] | + | xbindkeys |
| - | $ 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 ===== | + | <WRAP info> |
| + | **Notes:** | ||
| - | '' | + | * Works on X11 sessions only |
| + | * Wayland sessions generally do not support this method | ||
| + | * '' | ||
| + | </ | ||
| - | Check in ''/ | + | |
| + | |||
| + | |||
| + | |||
| + | ==== Package management ==== | ||
| + | |||
| + | === Fix broken packages === | ||
| <code bash> | <code bash> | ||
| - | $ls -lart //inverted sorted by time. Last entry is latest modified | + | sudo dpkg --configure -a |
| + | sudo apt --fix-broken install | ||
| </ | </ | ||
| + | ---- | ||
| + | |||
| + | |||
| + | |||
| + | ===== Additional Ressources ===== | ||
| + | |||
| + | ***[[https:// | ||
| - | ===== Misc Ressources ===== | + | ***[[https:// |
| - | *[[https://en.wikipedia.org/wiki/Magic_SysRq_key# | + | |
| - | | + | |