uname -r ; uname -afree -hdmesgcat /etc/rc.confls /homesudo fdisk -lcat /etc/fstabdf -hls /lib/modules/$(uname -r)ls /lib/modules/$(uname -r)/kernel/drivers/lsmodsudo modprobe module-namekldload module-namesudo modprobe -r module-namesudo rmmod module-namesudo umount your/pathsudo umount -asudo systemctl rebootsudo swaponsudo swapon -asudo swapoff -acat /sys/block/sdX/queue/schedulergrep "" /sys/block/*/queue/schedulerecho scheduler-name > /sys/block/sdX/queue/schedulerlscpulsusb -tlspci -tvcat /proc/meminfosudo dmidecode -t memoryhdparm -t /dev/sdXifconfigiwconfigcat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governorscat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governorecho governor-name | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governorstartxcat ~/.xinitrcglxinfo | grep OpenGLvulkaninfo | grep VulkanCheck if you have direct rendering enabled
glxinfo | grep "direct rendering"Environment variable to make a program use a different Mesa3D driver
MESA_LOADER_DRIVER_OVERRIDE=driver_name program
Environment variable to force a program to use LLVMpipe (OpenGL CPU emulation)
LIBGL_ALWAYS_SOFTWARE=true
(if you want to force all programs of the system to use LLVMpipe add this export LIBGL_ALWAYS_SOFTWARE=true command to your .bashrc file on your user folder or your shell configuration file, it's useful when the OpenGL version of your GPU is too low because your GPU is very old, it will make all games run but you can get very bad FPS if the game is vertex intensive)
hostnamehostname -Iping website-link or ip-addresswhois https://websitename.comclear!!su -sudo -idoas commandsudo commandsudo !!exitwhoami$HOMEecho $SHELLecho $0cat /etc/shellschsh -s /path/of/your/shellAdd an alias/abbreviation for a command on your terminal shell (add this command on your shell configuration file to be permanent, generally a file named .name-of-your-shell-rc on your user folder)
alias name='command'passwd user-namehistoryhistory namesudo chown -R user_name:group-name directory-nameOr
chown username file-namels /binls /sbinecho textecho $PATHldd program-nameexport PATH=$PATH:/your/directoryresettime command./The "&" operator is used for multitasking on terminal (it don't start the program process as a child of the terminal, but independent from it, so you can close the terminal, similar of what "exec" command does, replacing the shell process by the called program)
program &exec program-namesh script-namebash script-namepkill process-namekillall process-namekillall -u user-name>This operator store the output of a task on some file but don't overwrite its contents (example: task > file.txt)
>>This operator apply a command above the output of other program (example: glxinfo | grep OpenGL, this command will search for "OpenGL" inside the output of "glxinfo") - this method is technically known as "Unix pipe"
|git clone https://github.com/user-name/repository-name.gitgit clone https://website-name.com/repository-namegit clone https://website-name.com/repository-name your/folderDownload any file (as the HTTP protocol headers are flexible, it can download the wrong file, so try to specify the exact file without header problems, generally an exposed extension of the file in the URL "https://website.com/nameofthefile.extension")
wget https://website-name.com/file-namewget -c https://website-name.com/file-nameDownload any file and try again from where it stopped if the connection failed (by default wget tries 20 times)
wget --tries=anynumber https://website-name.com/file-namewget -i file.txtwget --recursive --page-requisites --html-extension --convert-links --no-parent https://website-name.comcurl -O https://website-name.comwget -C - -O https://website-name.com/file-namecurl -O https://website-name.com -O https://website2-name.comExample command for custom Wine Prefixes
WINEPREFIX=~/.prefix-name ./wineWINEPREFIX=~/.prefix-name ./wine explorerOption to extract AppImage files
--appimage-extractDownload a torrent with webtorrent-cli and open VLC media player
webtorrent download "magnet:..." --vlcmake -j1sudo make installls /etcls ~/.localShow files stored by XDG-compliant programs (FreeDesktop standard)
ls ~/.configsudo journalctl --vacuum-time=1drm -rf ~/.cache/thumbnails/*sudo apt-get autoremovesudo apt-get autocleanpackage-name*Or
*package-namedpkg --configure -apkg delete -apwdcd /name/of/your/foldercd -cd ..cd ~lsShow all folders/files from a directory, including the hidden ones
ls -aShow almost all files/folders, excluding the hidden . and .. Unix tree files
ls -Als *Show all files/folders inside all the folders of the directory, inclusing hidden ones
ls -a *ls -lcat directory/filegrep -nr "text" --include "*.format"grep -nr "text" --include "file-name.type"mkdir folder-namecp file-name destination-folderCopy a file to other folder, overwrite on destination and maintain the file permissions and timestamps
cp -p file-name destination-foldercp -v file-name destination-foldercp -i file-name destination-folderCopy a file to other folder, maintain permissions/timestamps, show the file being copied, ask permission to overwrite and make a backup
cp -pvib file-name destination-foldercp -b file-name destination-foldercp file1 file2 destination-foldercp -r folder-name destination-foldercp -r folder-name/. destination-folderCopy a folder to other folder, maintain permissions/timestamps, show the files being copied, ask permission to overwrite and make a backup
cp -rpvib folder-name destination-foldercp -r folder1 folder2 destination-foldermv folder-name destination-folderOr
mv file-name destination-foldermv -i file-name destination-foldermv *.type destination-foldermv folder-name new-folder-namerm file-nameRemove/delete any folder recursively without asking for permission (use with caution if you called the command with su/sudo/doas)
rm -rf your-folderrmdir your-folderecho "text" >> directory/file.file-name or .folder-name | A dot before the name of a file/folder make it hidden
Search for files on the directory/subdirectories (run with sudo or su if these directories are under root permissions)
find . -type f -name file-nameSearch for folders on the directory/subdirectories (run with sudo or su if the directories are under root permissions)
find . -type d -name folder-nametree folder-name