5/22/2024
[!NOTE] You can use this as a guide if you are using ubuntu or ubuntu based distros. I think some of this will work to on debian distros.
[!CAUTION] If you see something like this
<name>in the command, remove the brackets<>and replace it with what the bracket says. Read before copy and pasting!
.deb File.tar.xz File
Bash to Zsh
# update the repository
sudo apt update
# list all upgradable packages
apt list --upgradable
# upgrade specific packages or upgrade a single package
sudo apt --only-upgrade install gimp code kdenlive
# upgrade all packages
sudo apt upgrade
.deb File# this will work mostly fine
sudo dpkg -i thefilename.deb
# using apt
sudo apt install ./thefilename.deb
# run this if you get any dependency errors
sudo apt install -f
In this example, I'm going to show you how to upgrade from fedora 36 to fedora 37.
# upgrade system and reboot pc
sudo dnf upgrade
reboot
sudo dnf upgrade --refresh
dnf-plugin-system-upgrade if you haven't done that already.sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade download --releasever=37
Change the --releasever= number if you want to upgrade to a different version.
sudo dnf system-upgrade download --releasever=37 --allowerasing --best
uprade-system. This will reboot the system immediately without countdown and confirmation, so close all the programs and save your work.sudo dnf system-upgrade reboot
Reboot process going to take longer because it needs to apply the update just before the OS (on the boot logo). Don't touch anything assume that everything is fine even if the progress bar is not moving.
# remove cached metadata and transaction
sudo dnf system-upgrade clean
# remove cached packages
sudo dnf clean packages
Please Visit this official documentation from fedora. Because there's a lot of things that I didn't cover here. Source : https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
.tar.xz Filehttps://linuxize.com/post/how-to-extract-unzip-tar-xz-file/
tar xfv <file-name>.tar.xz
tar xfv <file-name>.tar.bz2
tar xfv <file-name>.tar.gz
tar xfv <file-name>.tar
Extract file into a directory
tar xfv <archive-name>.tar --directory=path/to/directory
tar xfv <archive-name>.tar.gz --directory=path/to/directory
tar xfv <archive-name>.tar.bz2 --directory=path/to/directory
tar xfv <archive-name>.tar.xz --directory=path/to/directory
If tar gives a Cannot exec error, you may need to run sudo apt install xz-utils first.
.tar file# if the file is .tar.gz
tar xfvz <archive-name>.tar.gz
# if the file is .tar.bz2
tar xfvj <archive-name>.tar.bz2
./configure
make
sudo make install
see this for more info : https://help.ubuntu.com/community/CompilingEasyHowTo
git clone <repository URL>
Example :
git clone https://github.com/get543/linux-beginner-guide
https://github.com/nodesource/distributions/blob/master/README.md#debinstall
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04
Download a video from youtube, how to install it.
yt-dlp -f best <link-here>
Download the highest 1080p .mp4 video-only and merge it with the best audio-only format. If no 1080p, use the highest before that.
yt-dlp -S "res:1080,ext" -f "bv*+ba/b" <link_here> -o "%(title)s.%(ext)s"
-f mp4 => for video format
-f best => for the best option
-f 140 => choose the number from the list
-F => display all available format
-o => C:\Users\dood\Downloads\%(title)s.%(ext)s => for the download path
--no-mtime => the time when you download it not the uploader time
See the full list here.
# Download and merge the best video-only format and the best audio-only format,
# or download the best combined format if video-only format is not available
$ yt-dlp -f "bv+ba/b"
# Download best format that contains video,
# and if it doesn't already have an audio stream, merge it with best audio-only format
$ yt-dlp -f "bv*+ba/b"
# Download the best video-only format and the best audio-only format without merging them
# For this case, an output template should be used since
# by default, bestvideo and bestaudio will have the same file name.
$ yt-dlp -f "bv,ba" -o "%(title)s.f%(format_id)s.%(ext)s"
# Download the best video available but with the smallest resolution
$ yt-dlp -S "+res"
# Download the smallest video available
$ yt-dlp -S "+size,+br"
# Download the best mp4 video available, or the best video if no mp4 available
$ yt-dlp -f "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b"
# Download the best video with the best extension
# (For video, mp4 > webm > flv. For audio, m4a > aac > mp3 ...)
$ yt-dlp -S "ext"
# Download the best video available with the largest resolution but no better than 480p,
# or the best video with the smallest resolution if there is no video under 480p
# Resolution is determined by using the smallest dimension.
# So this works correctly for vertical videos as well
$ yt-dlp -S "res:480"
# Download best video (that also has audio) that is closest in size to 50 MB
$ yt-dlp -f "b" -S "filesize~50M"
# Download the best video with worst codec no worse than h264,
# or the best video with best codec if there is no such video
$ yt-dlp -S "+codec:h264"
If you are having a problem with switching between speakers and headphones.
sudo gedit /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf
Change or Paste :
[Element Headphone]
switch = off
volume = merge
overide-map.1 = all
override-map.2 = all-left, all-right
[Element Speaker]
required-any = any
switch = mute
volume = off
sudo apt-get install indicator-sound-switcher
sudo apt install pavucontrol
alsamixer
F6 to select sound card.
Find sound card that you can enable or disable automute.
Use right/left arrow key and use up/down arrow key to change the value.
sudo apt install autokey-gtk
Add a new script.
Name: Toggle Auto Mute.
Add this script :
# Toggle - Disable or Enable Auto-Mute Mode
import os
# user input
# To get sound card number, open Terminal → Type → alsamixer → press Enter → press F6
sound_card_number = 2
# end of user input
###############################################################
time.sleep(0.5)
get_info_command = "amixer -c %s get 'Auto-Mute Mode'" % sound_card_number
get_info = system.exec_command(get_info_command)
time.sleep(1)
if get_info.find("Item0: 'Disabled'") is not -1: # disabled
time.sleep(0.8)
enable = "amixer -c %s set 'Auto-Mute Mode' Enabled" % sound_card_number
system.exec_command(enable)
os.system("notify-send 'Auto-Mute Mode of Sound Card Number %s' 'Enabled'" % sound_card_number)
quit()
else: # enabled
time.sleep(0.8)
disable = "amixer -c %s set 'Auto-Mute Mode' Disabled" % sound_card_number
system.exec_command(disable)
os.system("notify-send 'Auto-Mute Mode of Sound Card Number %s' 'Disabled'" % sound_card_number)
Change sound_card_number that has auto mute that you can disable or enable.
To do that, type this on terminal :
alsamixer
F6 to select sound card. And the number next to the sound card name is the sound_card_number.You can use this shell script to change output device between headphones and speakers. It uses zenity, it comes pre-installed on Ubuntu based distros. This is the same script as the Python script the only differrence is you don't have to download autokey.
On this example, open a video file :
# open any apps on defaults apps
xdg-open <file-name.mp4>
# or you can do this to if vlc installed
vlc <filename.mp4>
Alt + F2r# check all installed extensions
gnome-extensions list
# check enabled extensions
gnome-extensions list --enabled
.sh file :#! /bin/bash
sudo apt install vlc
sudo apt install obs-studio
sudo apt install simplenote
sudo apt install steam
sudo apt install -y wine
sudo apt update && sudo apt upgrade
Make the file executable :
chmod +x fileName.sh
Run the file :
./fileName.sh
Install the app using sudo apt install just put a space between each app
sudo apt install vlc obs-studio simplenote steam wine
https://askubuntu.com/questions/1034595/thumbnails-not-showing-in-video-in-ubuntu-18-04
sudo apt install ffmpegthumbnailer
# remove thumbnails folder in the .cache folder
rm -r ~/.cache/thumbnails/fail
# if that doesn't work, clear the entire thumbnails folder
rm -rf ~/.cache/thumbnails/*
# quit file manager and then you can re-open it
nautilus -q
https://fostips.com/enable-thumbnails-webp-ubuntu-fedora/
# add repository
sudo add-apt-repository ppa:krifa75/eog-ordissimo
# update repository
sudo apt update
# install the package
sudo apt install webp-pixbuf-loader
# remove the repository because it might break other packages
sudo add-apt-repository --remove ppa:krifa75/eog-ordissimo
# quit file manager
nautilus -q
https://superuser.com/questions/258633/why-is-thunar-not-creating-and-showing-thumbnails-of-images To get thumbnail on your thunar file manager, you need to install tumbler package.
# example on arch based systems
sudo pacman -Sy tumbler
# example on debian based systems
sudo apt install tumbler
Restart the file manager
# quit the application
thunar -q
# run it again
thunar
cd /usr/share/applications
sudo gedit <app-name>.desktop
Replace → Icon=/home/<current-user>/Pictures/Icons/something.png
sudo apt-get install ttf-mscorefonts-installerhttps://linuxhandbook.com/linux-file-permissions/
Change the webcam resolution :
cd /etc/modprobe.d/sudo nano droidcam.confIf there is a kernel update, you have to reinstall droidcam :
cd /tmp/
wget -O droidcam_latest.zip https://files.dev47apps.net/linux/droidcam_1.8.2.zip
# sha1sum: d1038e6d62cac6f60b0dd8caa8d5849c79065a7b
unzip droidcam_latest.zip -d droidcam
cd droidcam
sudo ./install-client
sudo ./install-video
If you have any problem,
# unload the driver
sudo rmmod v4l2loopback_dc
# reload the driver with a new resolution
sudo insmod /lib/modules/`uname -r`/kernel/drivers/media/video/v4l2loopback-dc.ko width=1920 height=1080
lshw -short
lshw-gui or lshw-gtk
Arch Titus → Arch Linux with a script.
Installing ArchTitus:
pacman -Sy git
git clone https://github.com/ChrisTitusTech/ArchTitus
cd ArchTitus
./archtitus.sh
https://github.com/rickellis/Arch-Linux-Install-Guide
# this
gamemoderun ./game
# or this
gamemoded ./game
# navigate to the .iso file
cd /path/to/iso/file
# create disk image 10GB
qemu-img create -f qcow2 Image.img 10G
# for windows :
qemu-system-x86_64.exe -cdrom .\manjaro-kde-20.0.3-200606-linux56.iso -boot menu=on -drive file=Image.img -m 2G -smp 2 --accel whpx
# for linux :
qemu-system-x86_64 -enable-kvm -show-cursor -cdrom ./archlinux-2022.04.05-x86_64.iso -boot menu=on -drive file=Image.img -m 2G -smp $(nproc) -cpu host -vga virtio -display gtk,gl=on
-cpu host → sets the CPU to the hosts' CPU.-smp 2 → sets the numbers of cores.-smp $(nproc) → use all available CPU cores.The -vga option can be used to specify one of various vga card emulators :
-vga → Linux only
qxl offers 2D acceleration but requires kernel modules qxl and bochs_drm to be enabled :
-vga qxl
virtio works much better and supports some 3D emulation :
-vga virtio -display sdl,gl=on
Source : https://youtu.be/AAfFewePE7c
More Options & Explanations : https://wiki.gentoo.org/wiki/QEMU/Options
Guide Virtualization on Linux (virt-manager and qemu). virt manager
I made my own script it is a file called freeramcache.sh. But if you want essentially the same thing as the command below.
# check free memory space
free -h
# disable swap
swapoff -a
##### wait approx 30 sec
# enable swap
swapon -a
# see the amount of swap used/available, decrease over time
free -h
# swap usage info
free -h
# swap status
swapon -s
# disable swap memory
sudo swapoff -a
/swapfile1G is the units8 is the integer
So together they define the size.# create a /swapfile that is 8GB in size
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
# set the correct permissions
sudo chmod 0600 /swapfile
# set up a linux swap area
sudo mkswap /swapfile
# # edit the file
# sudo nano /etc/fstab
# add that line in /etc/fstab
echo "/swapfile none swap sw 0 0" > /etc/fstab
# enable swap memory
sudo swapon /swapfile
# reload alsa driver
sudo alsa force-reload
# if it doesn't work, try using this
systemctl --user restart pulseaudio
# start it again with pulseaudio
pulseaudio --start
Remove a directory with nested folders and files.
rm -rorrm -rforrm -rfv
Example :
sudo rm -rfv <folders>
thunar -q
GTK_DEBUG=interactive thunar
wget <URL>
wget -i <download_files.txt>
wget -O <filename> <URL>
wget -r <link>
This is done by creating a mirror of the website.
wget -m --convert-links --page-requisites website_address
wget <link> -O ~/Downloads/<custom-file-name>.deb
wget -O <custom-file-name>.deb "<link>"
wget -c
curl "<http://example.com>" --output "<filepath>"
curl --remote-name "<http://example.com/filename>"
curl --output "<filepath-or-filename>" --fail --show-error --location --continue-at - "<http://example.com/filename>"
Go to about:config
ui.key.menuAccessKeyFocuseschange it tofalse
This will disable menubar when you press the alt key.
But still showing when you press the alt + t or alt + h.
ui.key.menuAccessKeychange it to0
This will completely disable the menubar shortcut.
The regular shortcut still work, like ctrl + w, ctrl + t.
This works on Realtek Semiconductor Corp. 802.11n.
How to check :
lsusb
How To Install :
sudo apt-get install build-essential git dkms linux-headers-$(uname -r)
git clone https://github.com/kelebek333/rtl8188fu
sudo dkms add ./rtl8188fu
sudo dkms build rtl8188fu/1.0
sudo dkms install rtl8188fu/1.0
sudo cp ./rtl8188fu/firmware/rtl8188fufw.bin /lib/firmware/rtlwifi/
Configuration :
sudo mkdir -p /etc/modprobe.d/
sudo touch /etc/modprobe.d/rtl8188fu.conf
echo "options rtl8188fu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/rtl8188fu.conf
Source : https://github.com/kelebek333/rtl8188fu
# show Aliases
alias
# syntax
alias name="yourcustomcommand"
# example
alias instalation="cd ~/Documents/shell && ./install.sh"
~/.bashrc~/.zshrc~/.config/fish/config.fish# if you are using bash
nano ~/.bashrc
# put this aliases in that file
alias instalation="cd ~/Documents/shell && ./install.sh"
# use it as current session
source ~/.bashrc
# remove added aliases
unalias instalation
# remove all aliases
unalias -a
This works by turning on gpu acceleration, by running this on terminal :
discord --enable-gpu-rasterization
You must create or edit the discord.desktop file, so you don't have to launch discord through terminal, like this :
discord.desktop usually located here :sudo nano /home/$USER/.local/share/applications/discord.desktop
[Desktop Entry]
Name=Discord
StartupWMClass=discord
Comment=All-in-one voice and text chat for gamers that is free, secure, and works on both your desktop and phone.
GenericName=Internet Messenger
Exec=/usr/bin/discord --enable-gpu-rasterization
Icon=discord
Type=Application
Categories=Network;InstantMessaging;
Path=/usr/bin
Path=/usr/bin
CTRL + X → to save and exit.Y → to confirm.# global config
git config --global user.name "get343"
# config email
git config --global user.email "blablabla@gmail.com"
# initialization
git init
# add all files in the directory
git add .
# commit
git commit -m "first commit"
# change branch to main
git branch -M main
# add a remote repository
git remote add origin "https://get543.github.io/mywebsite"
# push changes to github
git push -u origin main
# there's a change in the code and want to upload to github
git add .
git commit -m "commit message"
git push
# connecting github repository using ssh
git remote set-url origin git@github.com:get543/<project-name>.git
https://dev.to/doabledanny/git-cheat-sheet-50-commands-free-pdf-and-poster-4gcn
# check what the script contains
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
# if all good you can download and run it
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# will refresh the bashrc
source ~/.bashrc
# list available node version
nvm list-remote
# install node js using version number
nvm install v16.15.1
# install node js using version name
nvm install lts/gallium
# check what version of node installed
node -v
Source :
On most system usually will look something like this :
user@host:~$
I'm going to change it to more like this :
user@host ~
$
Edit the .bashrc file.
nano ~/.bashrc
Find something like this. Now this is the special characters before adding the colour into the prompt.
PS1="\u@\h:\W\$ "
And this is after adding a colour into the prompt. The colouring added before and after the special characters.
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
Just need to add a newline \n before the $ and delete : add a space after that, like this :
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\n\$ '
Source : https://www.computerhope.com/issues/ch001645.htm
Usually I do this when installing OBS.
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install ffmpeg obs-studio
But it outputs this error message.
The following packages have unmet dependencies:
obs-studio : Depends: libfdk-aac1 (>= 0.1.4) but it is not installable
E: Unable to correct problems, you have held broken packages.
You need to download the package from the debian website https://packages.debian.org/stretch/amd64/libfdk-aac1/download
And install it using this command :
# navigate to the downloads folder
cd Downloads
# install it using dpkg command
sudo dpkg -i libfdk-aac1_0.1.4-2+b1_amd64.deb
And finally rerun the obs install command.
sudo apt install obs-studio
Note : I experience broken theme if I use this method. Use flatpak instead.
Uninstall ippusbxd.
sudo apt purge ippusbxd
Download Both ipp-usb and sane-airscan.
https://download.opensuse.org/repositories/home:/pzz/xUbuntu_20.04/amd64/
Just Install it like usual.
sudo dpkg -i ipp-usb_0.9.22-1+52.1_amd64.deb
sudo dpkg -i sane-airscan_0.99.27-1+89.1_amd64.deb
Their github page here Copy paste guide here
echo "deb https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list
wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null
echo "deb-src https://deb.volian.org/volian/ scar main" | sudo tee -a /etc/apt/sources.list.d/volian-archive-scar-unstable.list
sudo apt update
sudo apt install nala
sudo apt update
sudo apt install nala-legacy
~/.bashrc file.nano ~/.bashrc
# replacing apt with nala
apt() {
command nala "$@"
}
sudo() {
if [ "$1" = "apt" ]; then
shift
command sudo nala "$@"
else
command sudo "$@"
fi
}
CTRL + X then Y to save it.
Refresh the file.
source ~/.bashrc
sudo systemd-resolve --flush-caches
sudo resolvectl flush-caches
sudo systemd-resolve --statistics
:e <filename> → open filename to edit:w → save file:q → exit vim:q! → quit without saving:wq → save file and close vim:x → write file and exit:sav <filename> → saves file as filename:!pwd → execute the PWD Unix command, and returns to viyy → copies the current linep → pastes the copied textu → undo the previously executed commanddd → deletes the current line: f <filename> → rename the fileTAB → autocomplete the commandTAB TAB → for displaying all file names and commands that start with those lettersctrl + alt + t → for opening the terminalctrl + u → to remove the current linectrl + a → move the cursor to start of the linectrl + e → move the cursor to the end of the linectrl + c → to stop the current commandctrl + z → to put a running command to sleepfg → to continue the process that's put to sleepbg → to continue the process in the background# to turn it on
pactl load-module module-loopback latency_msec=1
# to turn it off
pactl unload-module module-loopback
It loads a loopback module. The number 1 means the latency you receive. The latency is in miliseconds (ms). To turn it off, you just unload the module.
Before:
user@host ~/Downloads/linux-beginner-guide
$
After:
user@host ~/Downloads/linux-beginner-guide (main)
$
To do that you need to edit the .bashrc file in the home folder
nano ~/.bashrc
# git branch on terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
$(parse_git_bashrc) to run the function in bash promptPS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\] \[\033[01;33m\]$(parse_git_branch)\[\033[00m\]\n\$ '
.bashrc filesource ~/.bashrc
This means, on your local machine, you haven't made any SSH keys.
.ssh directory.# for linux
cd ~/.ssh
# for windows
cd C:\Users\<your-windows-username>\.ssh\
# listing
ls
# for long-listing
ll
id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub. If those two files don't show up, or if you have something similar just proceed to the next step, we are just going to create a new one. Your SSH keys must be named id_rsa and id_rsa.pub in order for GitHub to recognize them by default.your_email@example.com to your github email. This will create both id_rsa and id_rsa.pub files.ssh-keygen -t rsa -C "your_email@example.com"
cat command to see what's the content inside of a file.cat id_rsa.pub
git push and let see if it works.Don't forget to connect the repository through ssh
git remote set-url origin git@github.com:get543/<project-name>.git
More help on creating SSH Keys.
This issue can be resolve by replacing default XFCE Compositor to picom.
QXL.Window Manager Tweaks.Compositor tab.Enable display compositing.(picom). Install it using your distro's default package manager.# for debian based distros
sudo apt install picom
# for arch based distros
sudo pacman -S picom
picom directory in .config for start script and config file. And make the start script executable.# change directory
cd ~/.config
# make directory
mkdir picom
# from ~/.config change directory
cd picom
# make start.sh file
touch start.sh
# make start.sh an executable file
chmod +x start.sh
# make picom.conf file
touch picom.conf
start.sh filesleep 2 && picom -b --config /home/$USER/.config/picom/picom.conf
sleep → delay the command for 2 seconds.-b → run picom in the background.--config → load a custom config path.picom.conf file to ~/.config/picom/picom.conf.picom.conf file for the full version, and save the file as picom.conf on ~/.config/picom/picom.conf.start.sh into start script at login. To do that, search for Session and Startup.Application Autostart tab and click Add./home/<username>/.config/picom/start.shOK and CloseIf you have starship installed, you can run the custom function.
.bashrc filenano ~/.bashrc
# custom starship window title function
function set_win_title() {
local cmd=" 💨 ($@)"
if [[ "$cmd" == " 💨 (starship_precmd)" || "$cmd" == " 💨 ()" ]]
then
cmd=""
fi
if [[ $PWD == $HOME ]]
then
if [[ $SSH_TTY ]]
then
echo -ne "\033]0; 🏛️ @ $HOSTNAME ~$cmd\a" < /dev/null
else
echo -ne "\033]0; 🏠 ~$cmd\a" < /dev/null
fi
else
BASEPWD=$(basename "$PWD")
if [[ $SSH_TTY ]]
then
echo -ne "\033]0; 🌩️ $BASEPWD @ $HOSTNAME $cmd\a" < /dev/null
else
echo -ne "\033]0; 📁 $BASEPWD $cmd\a" < /dev/null
fi
fi
}
starship_precmd_user_func="set_win_title"
eval "$(starship init bash)"
trap "$(trap -p DEBUG | awk -F"'" '{print $2}');set_win_title \${BASH_COMMAND}" DEBUG
# list all disks
lsblk
# unmount /dev/sdb1 disk
sudo umount /dev/sdb1
# make usbdrive directory in /media/$USER
mkdir /media/$USER/usbdrive
# mount /dev/sdb1 with read, write, exe permissions to usbdrive folder
sudo mount -t vfat -o rw,exec,uid=1000,gid=1000,umask=022 /dev/sdb1 usbdrive
# mount /dev/sdb3 disk
udisksctl mount -b /dev/sdb3
# change owner of usbdrive folder to the current user
sudo chown -R $USER usbdrive
Add this to the ~/.bashrc file
bind -s 'set completion-ignore-case on'
Create a file and edit it
nano ~/.config/xfce4/helpers.rc
Add this to the file. This is an example of kitty terminal
TerminalEmulator=kitty
TerminalEmulatorDismissed=true
Bash to ZshThis wiki page covers a very detail installation of zsh with a lot of distros as an example.
zsh to package.# if you are using debian or ubuntu based distros
sudo apt install zsh
# if you are using arch based distros
sudo pacman -Sy zsh
# if you are using fedora based distros
sudo dnf install zsh
zsh command to make sure that it is installed and create a .zshrc file as a starting point.zsh.chsh -c $(which zsh)
# for debian
sudo apt install git curl wget
# for arch
sudo pacman -Sy git curl wget
# for fedora
sudo dnf install git curl wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
.zshrc and for the old one is still there just under different name..zshrc. If you don't know what to do, you can go to the official Oh-My-Zsh wiki page.nano ~/.zshrc
source ~/.zshrc
Just to be safe, logout and logback in to make sure everything is set up as it should be.
Some of my favourites :
sudo, press esc twice.CTRL + Ocopypath command.Find out more: https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins
Some of my fovourite themes :
Find out more: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
xrandr -d
xrandr -dScreen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
Virtual-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
...
Virtual-1 is my display
sudo nano /usr/share/lightdmxrandr.sh#!/bin/sh
xrandr --output Virtual-1 --primary --mode 1920x1080
chmod u+x /usr/share/lightdmxrandr.sh
Edit lightdm config file with sudo nano /etc/lightdm/lightdm.conf
Uncomment and Add the script. Add it below [Seat:*].
[Seat:*]
display-setup-script=/usr/share/lightdmxrandr.sh
greeter-setup-script=/usr/share/lightdmxrandr.sh
rebootxrandr -q, and this is the resultScreen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
Virtual-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 403mm x 302mm
...
Edit the setup script sudo nano /usr/share/sddm/scripts/Xsetup
Add this line
# change display resolution
xrandr --output Virtual-1 --mode 1920x1080 --rate 60.00
rebootSet the resolution in Settings > Display and click Apply. That will create a monitor.xml file, a configuration file for your monitor.
Copy that configuration file in the gdm .config folder.
# this
sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/monitors.xml
# if it doesn't work, go with this
sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/monitors.xml
cat /etc/default/grub | grep GRUB_THEME=
If it shows a value to a path, that means that you have to install the theme there. Example for me :
GRUB_THEME=/usr/share/grub/themes/zorin/theme.txt
So I have to install the theme in /usr/share/grub/themes folder.
If there's a # in front of GRUBTHEME=, it means that no themes is being used. So, it is better to install the theme in /boot/grub/themes folder. If you don't have it, follow this step :
mkdir command. (-p to just create every folder before themes if it doesn't exist).mkdir -p /boot/grub/themes
/boot/grub/themes folder.sudo chown $USER /boot/grub/themes
Your theme that you downloaded should have a file called theme.txt. That file you will going to put it in GRUB_THEME= in /etc/default/grub.
sudo nano /etc/default/grub
GRUB_THEME= and your new theme refrencing to the theme.txt.# grub theme before i changed it
GRUB_THEME=/usr/share/grub/themes/zorin/theme.txt
# the new grub theme
GRUB_THEME=/usr/share/grub/themes/legion/dedsec/theme.txt
sudo nano /etc/default/grub
GRUB_GFXMODE= and change it to your disired resolution GRUB_GFXMODE=1920x1080.# would mostly work
sudo update-grub
# if that doesn't work, try this
sudo grub-mkconfig -o /boot/grub/grub.cfg
# if it doesn't work either, try this one
sudo grub2-mkconfig -o /boot/grub/grub.cfg
Please see the github repo of your theme to install it properly.
Copy YOURTHEME folder to usr/share/plymouth/themes/YOURTHEME.
Install YOURTHEME in /usr/share/plymouth/themes.
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/YOURTHEME/YOURTHEME.plymouth 100
default.plymouth to the new one.sudo update-alternatives --config default.plymouth
And then choose your new theme.
initramfs image.sudo update-initramfs -u
More info : https://www.xmodulo.com/change-boot-splash-screen-ubuntu-linux-mint.html
Fix the obsidian empty space on the left and right.
Readable line length.If you want to use custom css. This only works if you Turn On Readable line length
.obsidian file on that vault..markdown-source-view.is-readable-line-width .CodeMirror,
.markdown-preview-view.is-readable-line-width .CodeMirror,
.markdown-source-view.is-readable-line-width .markdown-preview-sizer,
.markdown-preview-view.is-readable-line-width .markdown-preview-sizer {
max-width: 1000px;
margin: auto;
}
Source : https://indianstudent.hashnode.dev/linux-commands
ls - list files and directoriescd - change directorypwd - print working directorycp - copy files or directoriesmv - move or rename files or directoriesrm - remove or delete files and directoriesmkdir - create a new directoryrmdir - remove or delete an empty directorytouch - create a new empty file or update the timestamp of an existing filecat - display the contents of a filegrep - search for a pattern in a filefind - search for files and directoriestar - create or extract a tar archivegzip - compress or decompress a filechmod - change the permissions of a file or directorychown - change the ownership of a file or directoryssh - connect to a remote server using SSH protocolscp - copy files to or from a remote server using SSH protocolrsync - synchronize files between local and remote serverswget - download files from the internetcurl - transfer data from or to a server using various protocolsping - test the connectivity between two network devicestraceroute - display the route that packets take to reach a network devicenetstat - display network connections and statisticsifconfig - display network interface configurationip - display and modify network interface configurationroute - display and modify the kernel routing tableiptables - set up and manage firewall rulessystemctl - control system servicesjournalctl - view system logstop - display the processes running on a system, along with their resource usage statisticsps - display the processes running on a systemkill - terminate a processbg - run a command in the backgroundfg - bring a background process to the foregroundjobs - display the status of background jobscron - schedule tasks to run at specific times or intervalsat - schedule a one-time task to run at a specific timeuptime - display system uptime and load averagedf - display disk usage informationdu - display disk usage information for a directory or filemount - mount a file systemumount - unmount a file systemlsof - list open files and processeswho - display who is logged inlast - display recent login historyhistory - display the command historyless - view a file one page at a timemore - view a file one page at a timehead - display the first few lines of a filetail - display the last few lines of a filediff - compare two files line by linepatch - apply a patch to a fileawk - process and manipulate text filessed - process and manipulate text filessort - sort lines of text.vmdk to .qcow2.\qemu-img.exe convert -p -f vmdk -O qcow2 fedora-linux.vmdk fedora-linux.qcow2
qemu-img convert -p -f vmdk -O qcow2 ./fedora-linux.vmdk ./fedora-linux.qcow2
.qcow2 to .vmdkThe reason I'm doing it like is because it's not only support VMware but ESXi aswell. But I have not try this one before, I believe it'll work just fine.
.\qemu-img.exe convert -f qcow2 -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,compat6 fedora-linux.qcow2 fedora-linux.vmdk
qemu-img convert -p -f qcow2 -O vmdk fedora-linux.qcow2 fedora-linux.vmdk
[!NOTE]
Highlights information that users should take into account, even when skimming.
[!TIP] Optional information to help a user be more successful.
[!IMPORTANT]
Crucial information necessary for users to succeed.
[!WARNING]
Critical content demanding immediate user attention due to potential risks.
[!CAUTION] Negative potential consequences of an action.