sudo fdisk -l
mkdir /media/usb-drive
mount /dev/sdc1 /media/usb-drive/
umount /media/usb-drive
ls -l /dev/disk/by-uuid/*
- ( In /etc/fstab ):
/dev/disk/by-uuid/8765-4321 /media/usb-drive vfat 0 0
mount -a
- See guide https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows
- Remount file without rebooting with
sudo mount -a
ln -s /media/gamedisk/SteamLibrary/steamapps/common/rocketleague/ ~/.steam/steam/steamapps/common/
- Guide: https://askubuntu.com/a/157140/1967475
sudo apt-get install cifs-utils
sudo mkdir /media/myshare
sudo nano /etc/fstab
- Add a line like this:
//servername/sharename /media/myshare cifs uid=username,credentials=/home/username/.smbcredentials 0 0
nano ~/.smbcredentials
- Add credentials like so:
username=myusername
password=mypassword
domain=WORKGROUP
chmod 0600 ~/.smbcredentials
- Finally test the mount with
sudo mount -a
- If first mount was done incorrectly, first unmount with
sudo umount /media/myshare
- If first mount was done incorrectly, first unmount with
- Should see the share's files with
ls /media/myshare
sudo apt install timeshift -y
sudo timeshift --create --comments "A new backup"
- Can set the storage location (must be a linux filesystem) by adding
--snapshot-device /media/mything
- Can set the storage location (must be a linux filesystem) by adding
- To interactively restore, use
sudo timeshift --restore
- Clean guide: https://dev.to/rahedmir/how-to-use-timeshift-from-command-line-in-linux-1l9b
Edit the /etc/profile file using a text editor (e.g., sudo nano /etc/profile).
Add the following line at the end of the file: export PATH=$PATH:/new/directory/path
(replace /new/directory/path with the actual path you want to add).
Save and close the file.
Reload the /etc/profile file by running source /etc/profile or restarting your system.
Edit your user’s ~/.profile file using a text editor (e.g., nano ~/.profile).
Add the following line at the end of the file: export PATH=$PATH:/new/directory/path
(replace /new/directory/path with the actual path you want to add).
Save and close the file.
Reload your user’s profile by running source ~/.profile or restarting your terminal.
kquitapp5 krunner
nano ~/.config/krunnerrc
- Add this (first number is pointsize) - thanks Reddit thread:
[General]
...
font=Noto Sans,18,-1,5,50,0,0,0,0,0
mkdir ~/.config/autostart
cp /etc/xdg/autostart/org.kde.kalendarac.desktop ~/.config/autostart/
nano ~/.config/autostart/org.kde.kalendarac.desktop
- Add this to the Desktop entry:
Hidden=true
- Stop the service for the current session with
akonadictl stop
- Check that it's no longer running with
akonadictl status
- Check that it's no longer running with
- Win + PageUp for maximize, Win + PageDown for minimize
- Win+W for the windows overview
- Win+. for emoji picker
- More shortcuts: https://docs.kde.org/stable5/en/khelpcenter/fundamentals/kbd.html
From Brave AI:
To enable verbose boot on Ubuntu, you need to modify the GRUB configuration file to remove the quiet
and splash
options. Here are the steps:
- Open the terminal and run the command:
sudo nano /etc/default/grub
- Comment out the lines that start with
GRUB_CMDLINE_LINUX_DEFAULT
by adding a#
symbol at the beginning of each line. - Replace the commented-out lines with the following:
GRUB_CMDLINE_LINUX_DEFAULT=""
This will remove the quiet
and splash
options, enabling verbose boot.
- Save the changes by pressing
Ctrl+X
, thenY
, and finallyEnter
. - Run the command:
sudo update-grub
to apply the changes to the GRUB configuration. - Reboot your system to see the verbose boot output.
Alternatively, you can also enable verbose boot by adding the nosplash
and debug
options to the GRUB command line. To do this:
- Open the terminal and run the command:
sudo nano /etc/default/grub
- Add the following lines to the end of the file:
GRUB_CMDLINE_LINUX_DEFAULT="nosplash debug"
- Save the changes by pressing
Ctrl+X
, thenY
, and finallyEnter
. - Run the command:
sudo update-grub
to apply the changes to the GRUB configuration. - Reboot your system to see the verbose boot output.
Note that the nosplash
option will disable the graphical boot splash screen, and the debug
option will enable verbose boot output. You can adjust these options to your preference.
References:
- https://askubuntu.com/questions/19486/how-do-i-enable-verbose-boot-mode-in-ubuntu
- https://superuser.com/questions/1441155/how-to-get-live-usb-to-print-verbose-output-during-linux-boot
- https://unix.stackexchange.com/questions/44414/how-to-make-boot-output-verbose
- Make sure SSH is installed on the server computer with
sudo apt update && sudo apt install -y openssh-server
- Run the server with
sudo systemctl start ssh
- Edit the config with
sudo nano /etc/ssh/sshd_config
and ensure the lineX11Forwarding yes
is uncommented - Restart the server with
sudo systemctl restart ssh
- Get the server IP with
hostname -I
- Connect to it from the client computer with
ssh [email protected] -X
- Launch the desired app with commands like
kate
andflatpak run --nosocket=fallback-x11 --socket=x11 com.brave.Browser
How to properly remove an additional desktop environment (like when we all test lubuntu desktop for an hour and then relapse)
Method: https://askubuntu.com/a/492522
sudo /etc/NX/nxserver --startmode manual
- Ctrl+Alt+F[#] to switch to terminals 3 through 6
- Once viewing a TTY, Alt+F[#] is a faster switch shortcut
- #2 is usually the GUI
- #1 is usually the login chooser
crontab -e
find / -type f -name "*.env"
tar -czvf ~/destination-file-name.tar.gz /home/source
scp <remote_username>@<IPorHost>:<PathToFile> <LocalFileLocation>
sudo dnf install <package>
neofetch
fastfetch
echo "alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'" >> ~/.bash_aliases
- Reload bashrc which loads in bash_aliases with
source ~/.bashrc
- sudo lsof -i :45457
- sudo kill -9 55203
sudo nano /usr/share/applications/AndroidStudio.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Exec="/home/username/Applications/android-studio/bin/studio.sh" %f
Icon=/home/username/Applications/android-studio/bin/studio.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-android-studio
Name[en_GB]=android-studio.desktop
- Ref: https://stackoverflow.com/a/55763478
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
cat /proc/sys/fs/inotify/max_user_watches
- https://support.system76.com/articles/use-amd-fsr/
- Add
WINE_FULLSCREEN_FSR=1 %command%
to the launch commands of the game - To modify the sharpening strength, use something like
WINE_FULLSCREEN_FSR=1 WINE_FULLSCREEN_FSR_STRENGTH=1 %command%
- Then just lower the resolution in game while its set to fullscreen!
- For a non-Steam game, use Lutris settings (see article above)
- Find the USB mount point with a graphical disk utility or use
mount
- Unmount it with a command like
sudo umount /dev/sdb
- Write the ISO with a command like
sudo dd bs=4M if=Win10_22H2_English_x64v1.iso of=/dev/sdb status=progress
if [ -n "$SSH_CONNECTION" ] && [ -z "$SSH_AUTH_SOCK" ]; then
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/deploy_key
fi
- List Flatpak app processes
flatpak ps
- Kill desired app with something like
flatpak kill com.brave.Browser
mkdir ~/scripts
nano ~/scripts/name-of-script.sh
- Add your code for that script, then save
chmod +x ~/scripts/name-of-script.sh
nano ~/.bashrc
and add this to the bottom of the file:export PATH=$PATH:/home/username/scripts
source ~/.bashrc
Full version (fix-web-permissions.sh)
echo 'Fixing site permissions...' ;
sudo usermod -aG www-data $USER ;
sudo chown -R $USER:www-data . ;
echo -ne '##### (33%)\r' ;
find . -type d -exec chmod 755 {} \;;
echo -ne '############# (66%)\r' ;
find . -type f -exec chmod 644 {} \;;
echo -e '####################### (100%)\r' ;
sudo chmod -R g=u . ;
git config core.fileMode false ;
Lite version (fix-web-permissions-lite.sh)
echo 'Fixing site permissions...' ;
sudo chown -R $USER:www-data . ;
echo -ne '##### (33%)\r' ;
echo -ne '############# (66%)\r' ;
echo -e '####################### (100%)\r' ;
sudo chmod -R g=u . ;
git config core.fileMode false ;
~/scripts/resolve-play-nice.sh
mkdir converted;
for i in *.mp4 *.MP4 *.MOV *.mov *.mkv *.MKV; do ffmpeg -i "$i" -vcodec mjpeg -q:v 2 -acodec pcm_s16be -q:a 0 -f mov "./converted/${i%.*}.mov"; done
Guide I followed: https://dev.to/ksckaan1/setting-up-custom-screen-resolution-on-linux-permanently-1abg
~/scripts/surface-resolution.sh
xrandr --newmode "2880x1920_60.00" 473.25 2880 3112 3424 3968 1920 1923 1933 1989 -hsync +vsync ;
xrandr --admode HDMI-A-0 "2880x1920_60.00" ;
xrandr --addmode HDMI-A-0 "2880x1920_60.00" ;
xrandr --output HDMI-A-0 --mode "2880x1920_60.00" ;