Editing <span id="firstHeadingTitle">Linux Commands</span>
Read
Edit
View history
Not logged in
Talk
Contributions
Create account
Log in
Editing
Linux Commands
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Flatpak & Applications == === Give dolphin emulator flatpak full filesystem access like the non-flatpak version would have === sudo flatpak override --filesystem=host org.DolphinEmu.dolphin-emu You may also want to use FlatSeal for this == File Operations == === Copy every iso in the current folder into nintendon't format === for i in *; do mkdir "$(echo $i | sed 's/.iso//')"; mv "$i" "$(echo $i | sed 's/.iso//')"/game.iso; done === Copy while preserving permissions [Use archive mode, resolve symlinks, and skip files that are newer on the destination] === rsync -auL source-file destination-file === Copy with progress bar === rsync --progress source_file destination_file === Move all files that aren't folders into a folder === mv -- *(.) other_directory/ === Create a file and set its permissions === install -m 755 /dev/null filename.txt == System Monitoring & Logs == === View systemd service logs in real time [system service] === sudo journalctl -u notification-parse.service -f === View systemd service logs in real time [user service] === journalctl --user -u notification-parse.service -f === Print kernel version and CPU architecture === uname -a == Networking & Security == === Nmap ping scan an entire subnet very quickly === sudo nmap -T5 -sn 192.168.0.0/24 === Get a list of all files with setuid / SUID permissions === find / -perm -4000 -type f -exec ls -la {} 2>/dev/null \; == Docker == === Delete all docker images === docker rmi -f $(docker images -a -q) == Clipboard Utilities == === Get/Set data from clipboard: === getclip () { xclip -selection c -o } setclip () { xclip -selection c } == Media & Encoding == === Record audio files === [[Record Audio Files in the Command Line]] === Create an SSL Key and Cert pair === openssl req -new -x509 -nodes -out server.crt -keyout server.key === Cut a video or audio file into a clip based on seconds === [[FFmpeg Cut a video to a clip by seconds]] === Download any yt-dlp supported video, convert it to an mp3, then automatically number it based on the order they were downloaded in the playlist === yt-dlp --extract-audio --audio-format mp3 --output "%(autonumber)s - %(title)s.%(ext)s" {PUT LINK TO PLAYLIST OR VIDEO HERE} === Convert a folder of mp3s into DVD-compatible mpeg2 files (.dvd) while embedding a looping video on them for compatibility, reducing bit rate as low as it can go. === for i in *.mp3; do; ffmpeg -stream_loop -1 -i asteracube.webm -i "$i" -shortest -r 24 -loop 1 -codec:v mpeg2video -b:v 400k -codec:a ac3 -b:a 448 -vf scale=352:240 dvd/"${i%.*}.dvd"; done == Disk & System Management == === Add kernel boot parameters on truenas scale. This command adds "nomodeset" to the kernel parameters. It is auto-applied on reboot. === midclt call system.advanced.update '{"kernel_extra_options": "nomodeset"}' === Expand a partition to fit the whole disk without rebooting [In this case the disk is <code>/dev/nvme0n1</code> and the partition is <code>2</code>] === sudo growpart /dev/nvme0n1 2 sudo resize2fs /dev/nvme0n1p2 === Convert an existing linux install to ageless linux === curl -fsSL https://agelesslinux.org/become-ageless.sh | sudo bash -s -- --accept --flagrant === Remount a filesystem as read-write in the current directory === sudo mount -o remount,rw /dev/sdX1 . == Additional Resources == https://github.com/sujayadkesar/Linux-Privilege-Escalation#9-capabilities [https://youtu.be/aqp5ahzeOqA Youtube.com: Common Linux Privilege Escalation: Using Kernel Exploits] [https://arachnoid.com/SecureShell/index.html Arachnoid.com: How to use SSH] https://github.com/OpenRC/openrc/blob/master/service-script-guide.md https://www.truenas.com/community/threads/kernel-boot-parameter-how-to-add-to-tn-scale.110109/ https://agelesslinux.org/
Summary:
Please note that all contributions to Lucca's Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Lucca's Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
🎨 Theme Settings
Quick Presets
Code & Pre Block Text Color
Code / Pre Text Color
Background
Primary Background
Secondary Background
Tertiary Background
Hover Background
Text
Primary Text
Secondary Text
Muted Text
Accent & Borders
Accent
Accent Dim
Border
Border 2
Header & Sidebar
Header Start
Header End
Sidebar Background
Status Colors
Success
Danger
Warning
Reset to Default
Save & Close