Common system logs:
/var/log/syslog
View recent entries:
tail -f /var/log/syslog
List recently modified log files:
ls -lt /var/log
Notes:
tail -f follows logs in real timejournalctl is often preferredinxi -F
lsb_release -d
uname -snrm
Flags:
s: kernel namen: network node hostnamer: kernel relase numberm: machine hardware namelscpu cat /proc/cpuinfo
free -h
df -h
lsmod
history
uptime # load average dmesg -T | tail # recent kernel messages vmstat 1 # system performance mpstat -P ALL 1 # CPU usage per core pidstat # process statistics free -h # memory usage
findmnt
lsblk
sudo mkdir -p /media/DRIVE sudo mount /dev/sdX# /media/DRIVE
sudo umount /media/DRIVE
Manage service:
sudo systemctl start smbd sudo systemctl stop smbd sudo systemctl restart smbd
If an NTFS volume mounts as read-only, it is usually due to an unclean shutdown or filesystem inconsistency.
Attempt repair:
sudo ntfsfix /dev/sdX#
Then remount:
sudo mount -t ntfs3 /dev/sdX# /mnt/ntfs
Create mount point if needed:
sudo mkdir -p /mnt/ntfs
Notes:
ntfsfix performs basic repairs and clears the “dirty” flagchkdskIf a FAT32 filesystem mounts as read-only, it is often due to detected corruption.
Check kernel logs:
dmesg
Typical errors:
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:
sudo umount /dev/sdX# sudo fsck.vfat -a -w /dev/sdX#
-a automatically repair filesystem-w write changes to disk
Note: Ensure the correct device is targeted before running fsck.
Uppercase .JPG to lowercase .jpg
for i in *.JPG; do mv "$i" "${i/.JPG/.jpg}"; done
Alternative (rename tool):
rename 's/\.JPG$/.jpg/' *.JPG
: > /path/to/file
Extract part of a string:
date | cut -c17-24
# Extract tar -xvf file.tar tar -xvzf file.tar.gz # Create tar -cvf file.tar /path/folder tar -cvzf file.tar.gz /path/folder
Flags:
c create archivex extract archivev verbose (list files processed)f specify archive filez gzip compressionPATH is the environment variable containing a list of directories searched for executables.
# Print PATH printenv PATH echo "$PATH" # Example resolution ping 127.0.0.1 PATH=/bin:/sbin:/usr/bin:/usr/sbin │ │ │ └── /sbin/ping ? found └── /bin/ping ? not found # Add a folder to PATH (current session only) PATH=$PATH:/path/to/app/folder
Common locations for manually installed binaries:
/opt/ # bundled applications /usr/local/bin/ # system-wide manual installs ~/.local/bin/ # user-only installs (recommended) /home/USER/opt/ # alternative user-only location
Add to ~/.profile or ~/.bashrc:
export PATH="/path/to/bin:$PATH"
Apply without logout:
source ~/.profile
Note: PATH must point to the directory, not the binary itself.
type man # man is /usr/bin/man
Run an AppImage:
chmod +x example.AppImage ./example.AppImage
Some support automatic install:
./example.AppImage --install
Manual extraction:
./your.AppImage --appimage-extract
Launch menu editor:
cinnamon-menu-editor
User-level entries:
~/.local/share/applications/
Place or create a .desktop file in this directory.
Example minimal file:
[Desktop Entry] Name=My App Exec=/path/to/executable Type=Application Terminal=false
The entry should appear automatically in the menu.
Note: Avoid using /usr/share/applications/ unless a system-wide install is required.
Config file:
/etc/default/grub
Line for background image:
GRUB_BACKGROUND=/path/to/image.jpg
Using cpulimit:
cpulimit -P /path/to/executable -l 40 -b
System-wide:
sudo cp -r /path/to/fonts /usr/share/fonts/ sudo fc-cache -f -v
User-only:
~/.local/share/fonts/
Then refresh cache:
$ sudo fc-cache -f -v
CLI:
pdf-stapler cat in.pdf 2-3 out.pdf
GUI (recommended):
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
-dPDFSETTINGS presets:
/screen low-resolution output, smallest file, lowest quality/ebook medium-resolution output, good size/quality compromise/printer print-oriented output, larger file, higher quality/prepress prepress-oriented output, larger file, higher quality/default general-purpose output, can produce larger filesNote: Ghostscript rewrites the PDF.
It often reduces file size, especially with image-heavy PDFs, but this is not guaranteed.
Lightweight video player with minimal UI, suitable for clean output on external displays.
Example:
mpv --fs --no-border --ontop --geometry=+3200 --osd-level=0 video.mp4
Common options:
--fs # fullscreen --no-border # remove window decorations --ontop # keep window above others --geometry=+X+Y # window position (multi-display setups) --osd-level=0 # disable on-screen display
Configuration file:
~/.config/mpv/mpv.conf
Legacy setup kept for reference.
Configuration files:
Example options:
fs=yes noborder=yes ontop=yes geometry=+3200 osdlevel=0
Use TestDisk / PhotoRec as a first recovery tool.
Do not write recovered files to the source disk.
For some recovered .mov files, PhotoRec may split the video into separate ftyp and mdat parts.
In PhotoRec FileOpts, enable:
[X] mov/mdat Recover mdat atom as a separate file
Sort recovered files by name, then try concatenating matching parts:
cat f123_ftyp.mov f456_mdat.mov > recovered_1.mov cat f456_mdat.mov f123_ftyp.mov > recovered_2.mov
One order may produce a usable file.
Sometimes the header/container part may be .mp4 while the media data part is .mov:
cat f54114560.mp4 f51781632_mdat.mov > recovered.mov
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.
The Apple USB SuperDrive requires a vendor-specific command to activate on non-Apple systems.
sudo apt install sg3-utils
Usually appears as /dev/sr0:
lsblk
sudo sg_raw /dev/sr0 EA 00 00 00 00 00 01
The drive should become usable immediately after.
Note: This command must be reissued after reconnecting the drive.
NOTE : MOVE TO BOTTOM 'MISC' SECTION AFTER REWRITE
To locate the QCAD plugin directory:
Go to:
Click on any plugin name to reveal its file location.
Note: Useful for locating and removing plugins related to trial limitations.
smbclient -L //host -U username
host → hostname or IP of the serversudo mount -t cifs //host/share /mnt/share -o username=user
Create mount point if needed:
sudo mkdir -p /mnt/share
When mounting via a file manager (Nautilus, Nemo, etc.), shares are typically mounted under:
/run/user/UID/gvfs/
Notes:
smbclient -L is useful for discovery and debugging access issuesmount -t cifs provides a standard way to mount shares in scripts or system configsCreate an alias:
alias name='command'
Example:
alias ll='ls -lah'
Aliases are active for the current session only.
To make them persistent, add them to:
~/.bashrc
Reload configuration:
source ~/.bashrc # or . ~/.bashrc
List aliases:
alias
Remove an alias:
unalias name
Install tools:
sudo apt install xbindkeys xvkbd
Identify button codes:
xev | grep button
Create configuration:
touch ~/.xbindkeysrc
Example:
# Send Enter on mouse button 8 "xvkbd -text '\r'" b:8
Start xbindkeys:
xbindkeys
Notes:
xvkbd simulates keypresses; alternative tools may be preferred depending on use casesudo dpkg --configure -a sudo apt --fix-broken install