shubhattin / os-config

0 stars 0 forks source link

Make a Working Linux Mint Config #1

Closed shubhattin closed 2 weeks ago

shubhattin commented 1 month ago

Setup Linux mint for your device with all the features, you use. Find replacements for apps, see how to access linux file system of windows and vice versa. try out VM and see its performance

shubhattin commented 4 weeks ago

OS Installation and Boot

Notes

shubhattin commented 4 weeks ago

Basic Setup

shubhattin commented 4 weeks ago

Software

VS Code Keybindings Fix

Initially refer to Windows and Linux keybindings guide to see if the shortcut you is event present on you or platform.

shubhattin commented 4 weeks ago

Others

shubhattin commented 4 weeks ago

Shortcuts, Notes

shubhattin commented 3 weeks ago

Backup Instructions for /home directory

A better option always would be to have a separate partition for /home

Use rsync to backup as it is supposed to preserve file permissions

Getting ignorelist

save ignorelist

wget https://raw.githubusercontent.com/rubo77/rsync-homedir-excludes/master/rsync-homedir-excludes.txt -O /var/tmp/ignorelist

Edit the file to add .venv, node_modules, etc. Also go through the file once if required.

Backup

If the drive used lacks space then you should consider not system files like repos, video, audio and other multimedia somewhere else.

It would also be recommended if backup your git repositories in a tar file to avoid problems with file permissions

sudo rsync -avh --progress --exclude-from=/var/tmp/ignorelist /home/<username>  <backup_path>    # usually like /media/<username>/<drive_name>/<loc>

Also after successful backup to the external drive you should also replace old username with new username if they are not same. This should avoid some potential problems which may occur.

#!/bin/bash
directory="<backup_path>"
search_text="/home/<old_username>"
replace_text="/home/<new_username>"
find "$directory" -type f -name "*.txt" -exec sed -i "s|$search_text|$replace_text|g" {} \;

Restore

sudo rsync -avh --progress <backup_path> /home/<new_username>/

After successful restore also set ownership if it had gone wrong

sudo chown -R <new_username>:<new_username> /home/<new_username>