linux:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:start [2026/07/02 21:17] – [File operations] mhlinux:start [2026/10/31 22:34] (current) – [claude] align eGPU link label with page title (Core X) claude
Line 3: Line 3:
   -**[[linux:bash|Bash]]**   -**[[linux:bash|Bash]]**
   -**[[linux:git|Git basics]]**   -**[[linux:git|Git basics]]**
-  -**[[linux:eGPU|Razer Core eGPU]]**+  -**[[linux:eGPU|Razer Core X eGPU]]**
   -**[[linux:RBS|Razer Blade Stealth in Linux]]**   -**[[linux:RBS|Razer Blade Stealth in Linux]]**
  
Line 19: Line 19:
  
 <code bash> <code bash>
-tail -f /var/log/syslog+tail -f /var/log/syslog   # if rsyslog is installed 
 +journalctl -f             # systemd journal (Fedora, Debian 12+)
 </code> </code>
  
Line 37: Line 38:
 ===== System information ===== ===== System information =====
  
-=== General overview: ===+=== General overview ===
  
 <code bash> <code bash>
Line 43: Line 44:
 </code> </code>
  
-=== Distribution: ===+=== Distribution ===
  
 <code bash> <code bash>
Line 49: Line 50:
 </code> </code>
  
-=== Kernel: ===+=== Kernel ===
  
 <code bash> <code bash>
Line 59: Line 60:
   *''s'': kernel name   *''s'': kernel name
   *''n'': network node hostname   *''n'': network node hostname
-  *''r'': kernel relase number+  *''r'': kernel release number
   *''m'': machine hardware name   *''m'': machine hardware name
  
  
-=== CPU: ===+=== CPU ===
  
 <code bash> <code bash>
Line 70: Line 71:
 </code> </code>
  
-=== Memory: ===+=== Memory ===
  
 <code bash> <code bash>
Line 76: Line 77:
 </code> </code>
  
-=== Mounted filesystems: ===+=== Mounted filesystems ===
  
 <code bash> <code bash>
Line 82: Line 83:
 </code> </code>
  
-=== Kernel modules: ===+=== Kernel modules ===
  
 <code bash> <code bash>
Line 88: Line 89:
 </code> </code>
  
-=== Bash history: ===+=== Bash history ===
  
 <code bash> <code bash>
Line 102: Line 103:
 dmesg -T | tail     # recent kernel messages dmesg -T | tail     # recent kernel messages
 vmstat 1            # system performance vmstat 1            # system performance
-mpstat -P ALL 1     # CPU usage per core +mpstat -P ALL 1     # CPU usage per core (package: sysstat) 
-pidstat             # process statistics+pidstat             # process statistics (package: sysstat)
 free -h             # memory usage free -h             # memory usage
 </code> </code>
Line 112: Line 113:
 ===== Mounting ===== ===== Mounting =====
  
-=== List mounts: ===+=== List mounts ===
  
 <code bash> <code bash>
Line 118: Line 119:
 </code> </code>
  
-=== List disks: ===+=== List disks ===
  
 <code bash> <code bash>
Line 124: Line 125:
 </code> </code>
  
-=== Mount: ===+=== Mount ===
  
 <code bash> <code bash>
Line 131: Line 132:
 </code> </code>
  
-=== Unmount: ===+=== Unmount ===
  
 <code bash> <code bash>
Line 139: Line 140:
 ---- ----
  
-==== Samba ====+===== Samba =====
  
-Manage service:+==== Manage service ====
  
 <code bash> <code bash>
Line 148: Line 149:
 sudo systemctl restart smbd sudo systemctl restart smbd
 </code> </code>
 +
 +----
 +
 +==== List available shares ====
 +
 +<code bash>
 +smbclient -L //host -U username
 +</code>
 +
 +  * ''host'' → hostname or IP of the server
 +  * prompts for password
 +
 +----
 +
 +==== Access a share (temporary mount) ====
 +
 +Create mount point if needed:
 +
 +<code bash>
 +sudo mkdir -p /mnt/share
 +</code>
 +
 +Then mount:
 +
 +<code bash>
 +sudo mount -t cifs //host/share /mnt/share -o username=user
 +</code>
 +
 +----
 +
 +==== GUI mounts (file manager) ====
 +
 +When mounting via a file manager (Nautilus, Nemo, etc.), shares are typically mounted under:
 +
 +<code>
 +/run/user/UID/gvfs/
 +</code>
 +
 +----
 +
 +==== Notes ====
 +
 +<WRAP info>
 +**Notes:**
 +
 +  * ''smbclient -L'' is useful for discovery and debugging access issues
 +  * ''mount -t cifs'' provides a standard way to mount shares in scripts or system configs
 +  * SMB1 is deprecated and may be disabled on modern systems
 +</WRAP>
  
 ---- ----
Line 161: Line 211:
 </code> </code>
  
-Then remount:+Create mount point if needed:
  
 <code bash> <code bash>
-sudo mount -t ntfs3 /dev/sdX# /mnt/ntfs+sudo mkdir -p /mnt/ntfs
 </code> </code>
  
-Create mount point if needed:+Then remount:
  
 <code bash> <code bash>
-sudo mkdir -p /mnt/ntfs+sudo mount -t ntfs3 /dev/sdX# /mnt/ntfs
 </code> </code>
  
Line 220: Line 270:
 === Mass renaming === === Mass renaming ===
  
-Uppercase .JPG to lowercase .jpg+__**Changing an extension:**__
  
 <code bash> <code bash>
Line 226: Line 276:
 </code> </code>
  
-Or changing a prefix:+__**Changing a prefix:**__
  
 <code bash> <code bash>
Line 234: Line 284:
 </code> </code>
  
-Alternative (rename tool):+  * ''"prefix"*.png'' targets only files beginning with the selected prefix, so unrelated files in the folder are ignored. 
 +  * ''${i/#prefix/another prefix}'' replaces only the prefix at the beginning of the filename. If the same text appears later in the filename, it is left untouched. 
 +  * In Bash parameter expansion, the ''#'' before ''prefix'' means “match only at the start of the variable value”. Without ''#'', Bash would replace the first matching occurrence anywhere in the filename. 
 +  * ''mv -n'' prevents overwriting an existing file if the renamed target already exists. 
 +  * ''--'' tells ''mv'' that everything after it is a filename, not an option. This protects against unusual filenames starting with ''-''. 
 +  * ''"$i"'' keeps the original filename safely quoted, so spaces and special characters in filenames are preserved. 
 + 
 +__**Alternative (rename tool):**__
  
 <code bash> <code bash>
 rename 's/\.JPG$/.jpg/' *.JPG rename 's/\.JPG$/.jpg/' *.JPG
 </code> </code>
 +
 +  * Use the ''for ... done'' + ''mv -n --'' loop for safe, explicit prefix renaming.
 +  * Use ''rename'' for concise regex-based changes, especially extension changes such as ''.JPG'' to ''.jpg''.
 +  * On Linux Mint / Ubuntu, ''rename 's/\.JPG$/.jpg/' *.JPG'' usually works because the available ''rename'' is the Perl-style tool.
 +  * On Ubuntu / Mint the Perl-style ''rename'' is a separate package and is not always preinstalled: ''sudo apt install rename''.
 +  * The ''rename'' command is not fully portable across all Linux distributions, because different systems may ship different versions with different syntax.
 +  * For safety, preview first with ''rename -n 's/\.JPG$/.jpg/' *.JPG''.
  
 ---- ----
Line 323: Line 387:
 </code> </code>
  
-[[http://refspecs.linuxfoundation.org/fhs.shtml|FHS Reference]]+[[https://refspecs.linuxfoundation.org/fhs.shtml|FHS Reference]]
  
 === Add to PATH === === Add to PATH ===
Line 425: Line 489:
 <code> <code>
 GRUB_BACKGROUND=/path/to/image.jpg GRUB_BACKGROUND=/path/to/image.jpg
 +</code>
 +
 +Apply the change:
 +
 +<code bash>
 +# Ubuntu / Mint
 +sudo update-grub
 +
 +# Fedora
 +sudo grub2-mkconfig -o /boot/grub2/grub.cfg
 </code> </code>
  
Line 457: Line 531:
  
 <code bash> <code bash>
-$ sudo fc-cache -f -v+fc-cache -f -v
 </code> </code>
  
Line 547: Line 621:
 </code> </code>
  
 +===== Alias =====
 +
 +Create an alias:
 +
 +<code bash>
 +alias name='command'
 +</code>
 +
 +Example:
 +
 +<code bash>
 +alias ll='ls -lah'
 +</code>
 +
 +Aliases are active for the current session only.
 +
 +To make them persistent, add them to:
 +
 +<code>
 +~/.bashrc
 +</code>
 +
 +Reload configuration:
 +
 +<code bash>
 +source ~/.bashrc
 +# or
 +. ~/.bashrc
 +</code>
 +
 +----
 +
 +==== Manage aliases ====
 +
 +List aliases:
 +
 +<code bash>
 +alias
 +</code>
 +
 +Remove an alias:
 +
 +<code bash>
 +unalias name
 +</code>
 +
 +===== Package management =====
 +
 +==== Fix broken packages ====
 +
 +__**Ubuntu / Mint (apt):**__
 +
 +<code bash>
 +sudo dpkg --configure -a
 +sudo apt --fix-broken install
 +</code>
 +
 +__**Fedora (dnf):**__
 +
 +<code bash>
 +sudo dnf distro-sync
 +sudo rpm --rebuilddb
 +</code>
 +
 +  * ''dnf distro-sync'' realigns installed packages with the repositories and resolves inconsistent dependencies
 +  * ''rpm --rebuilddb'' rebuilds the RPM database if it is damaged
  
  
Line 619: Line 759:
 </WRAP> </WRAP>
  
-===== QCAD (plugin location) =====+===== Additional Resources =====
  
-<WRAP center round alert 60%> +  * [[https://en.wikipedia.org/wiki/Magic_SysRq_key#Configuration|SysRq Keys]] -- Best combo is ''Alt + SysRq + R E I S U B'' 
-NOTE : MOVE TO BOTTOM 'MISC' SECTION AFTER REWRITE +  * [[https://wiki.networksecuritytoolkit.org/nstwiki/index.php?title=HowTo_Create_A_GPT_Disk_With_EFI_System_And_exFAT_Partitions_Using_Parted|Creating GPT/exFAT partitions using CLI]]
-</WRAP>+
  
  
-To locate the QCAD plugin directory: +====== Misc / Desktop ======
- +
-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. +
-</WRAP>+
  
 ===== Screen recording ===== ===== Screen recording =====
Line 648: Line 777:
   * simplescreenrecorder → lightweight, reliable on X11   * simplescreenrecorder → lightweight, reliable on X11
   * vokoscreenNG → simple GUI, good for quick recordings   * vokoscreenNG → simple GUI, good for quick recordings
 +  * Spectacle → on Fedora (KDE Plasma), the native screenshot tool can also record video; nothing to install
  
 ==== Notes ==== ==== Notes ====
Line 653: Line 783:
   * Older tools such as Kazam or gtk-recordmydesktop are largely unmaintained and may not work reliably on modern systems   * 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   * Wayland sessions may require OBS or desktop-native recording tools
- 
-===== Samba ===== 
- 
-==== List available shares ==== 
- 
-<code bash> 
-smbclient -L //host -U username 
-</code> 
- 
-  * ''host'' → hostname or IP of the server 
-  * prompts for password 
- 
----- 
- 
-==== Access a share (temporary mount) ==== 
- 
-<code bash> 
-sudo mount -t cifs //host/share /mnt/share -o username=user 
-</code> 
- 
-Create mount point if needed: 
- 
-<code bash> 
-sudo mkdir -p /mnt/share 
-</code> 
- 
----- 
- 
-==== GUI mounts (file manager) ==== 
- 
-When mounting via a file manager (Nautilus, Nemo, etc.), shares are typically mounted under: 
- 
-<code> 
-/run/user/UID/gvfs/ 
-</code> 
- 
----- 
- 
-==== Notes ==== 
- 
-<WRAP info> 
-**Notes:** 
- 
-  * ''smbclient -L'' is useful for discovery and debugging access issues 
-  * ''mount -t cifs'' provides a standard way to mount shares in scripts or system configs 
-  * SMB1 is deprecated and may be disabled on modern systems 
-</WRAP> 
- 
-===== Alias ===== 
- 
-Create an alias: 
- 
-<code bash> 
-alias name='command' 
-</code> 
- 
-Example: 
- 
-<code bash> 
-alias ll='ls -lah' 
-</code> 
- 
-Aliases are active for the current session only. 
- 
-To make them persistent, add them to: 
- 
-<code> 
-~/.bashrc 
-</code> 
- 
-Reload configuration: 
- 
-<code bash> 
-source ~/.bashrc 
-# or 
-. ~/.bashrc 
-</code> 
- 
----- 
- 
-==== Manage aliases ==== 
- 
-List aliases: 
- 
-<code bash> 
-alias 
-</code> 
- 
-Remove an alias: 
- 
-<code bash> 
-unalias name 
-</code> 
  
 ===== Mouse button mapping ===== ===== Mouse button mapping =====
Line 793: Line 830:
 </WRAP> </WRAP>
  
 +===== QCAD (plugin location) =====
  
 +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.
  
-==== Package management ==== +<WRAP info> 
- +**Note:** Useful for locating and removing plugins related to trial limitations. 
-=== Fix broken packages === +</WRAP>
- +
-<code bash> +
-sudo dpkg --configure -a +
-sudo apt --fix-broken install +
-</code> +
- +
----- +
- +
- +
- +
-===== Additional Ressources ===== +
- +
-  ***[[https://en.wikipedia.org/wiki/Magic_SysRq_key#Configuration|SysRq Keys]]** -- Best combo is ''Alt + SysRq + R E I S U B'' +
- +
-  ***[[https://www.guruadvisor.net/en/software-saas/465-advanced-linux-troubleshooting-methods-and-tools-for-diagnostics-and-problem-identification|Advanced Linux Troubleshooting]]** +
- +
-  ***[[https://wiki.networksecuritytoolkit.org/nstwiki/index.php?title=HowTo_Create_A_GPT_Disk_With_EFI_System_And_exFAT_Partitions_Using_Parted|Creating GPT/exFAT partitions using CLI]]**+
  • linux/start.1783019849.txt.gz
  • Last modified: 2026/07/02 21:17
  • by mh