Linux - kamack38/Essentials GitHub Wiki
-
shred <file>
overwrite some file with random content and delete it
Warning
This does not work on COW filesystems file BTRFS, ZFS and BCacheFS. COW can be disabled for a
single file using chattr +C /dir/file
-
basename/dirname <path>
get the basename/dirname of the path -
journalctl -p 3 -xb
show system errors and add e[x]planations for current [b]oot -
sudoedit
edit files as a super user using specified$EDITOR
-
sudo udevadm control --reload && sudo udevadm trigger
reload udev rules -
gpg-connect-agent reloadagent /bye
reload gpg-agent -
rsync -avu --delete "/home/user/from" "/home/user/to"
sync two directories -
git merge-file merged.txt empty.txt file2.txt
- mergemerged.txt
andfile2.txt
-
mount -o remount -a
- remount [a]ll filesystems as defined in/etc/fstab
-
pacman -F <name>
find which package provides a specified binary -
pacman -Ql <name>
list all files installed by a package -
pacman -Rns (pacman -Qtdq)
clean orphans -
pacman -Rdd <name>
remove a package without removing packages that require it -
pacman -Sc
clean cache -
makepkg --printsrcinfo > .SRCINFO
generate .SRCINFO for a package
ffmpeg -i input_file -vn -f mp3 output_file
ffmpeg -i video_file -i subtitles_file -c copy -c:s mov_text -metadata:s:s:1 language=eng output_file
yt-dlp -x --audio-format mp3
snapper list-configs
sudo snapper -c <config> list
sudo snapper -v -c root undochange <snapshot id to restore from>..<current snapshot id>
Tip
Snapper (at least for me) automatically creates a snapshot of the current system with id 0
.
-
ctrl+z
suspend current job (make a program run in a background) -
fg
bring most recently suspended or running background job to foreground -
bear -- make
generatecompile_commands.json
from a compile command
-
cat /proc/asound/cards
list sound cards
pactl load-module module-combine-sink
And to enable permanently
~/.config/pipewire/pipewire-pulse.conf
context.exec = [
{ path = "pactl" args = "load-module module-combine-sink" }
]
systemctl --user restart wireplumber pipewire pipewire-pulse
chmod -R 700 ~/.local/share/baloo
balooctl6 disable
balooctl6 purge
balooctl6 enable
touch ~/.local/share/baloo/index
sudo pacman -S archlinux-xdg-menu
# Set this globally
XDG_MENU_PREFIX=arch- kbuildsycoca6
The following packages are required:
android-sdk jdk17-openjdk android-sdk-platform-tools android-sdk-build-tools android-tools android-sdk-cmdline-tools-latest gradle android-studio android-platform android-emulator
If you're still having issues check the permissions on /opt/android-sdk
and unset custom
$ANDROID_HOME
Fixing permissions:
sudo groupadd android
sudo usermod -a -G android $(whoami)
sudo chown -R root:android /opt/android-sdk
sudo chmod -R g=u /opt/android-sdk
paru -S jadx jadx-gui-desktop
paru -S httptoolkit-bin
Create an AVD with Pixel 8
and Triamisu x86_64 API 33 Android 13.0 (Google APIs)
(worked for me
the best). Then start httptoolkit and follow in-app instructions.
Follow instrcutinons on Diolinux/PhotoGIMP
First install the requirements
pacman -S pandoc-cli texlive-latex texlive-basic texlive-latexrecommended texlive-fontsrecommended
And then compile it
pandoc file.md -o output.pdf
Go to /etc/systemd/logind.conf
and uncomment:
HandlePowerKey=ignore
PowerKeyIgnoreInhibited=yes
sudo systemctl daemon-reload
# Or to reload user configuration
systemctl --user daemon-reload
reboot
-
halt
- shutdown