https://github.com/392781/linux-hints
I'm fed up looking up Linux set up instructions on the internet... Time to make my own reference.
https://github.com/392781/linux-hints
bash linux settings ubuntu
Last synced: about 1 month ago
JSON representation
I'm fed up looking up Linux set up instructions on the internet... Time to make my own reference.
- Host: GitHub
- URL: https://github.com/392781/linux-hints
- Owner: 392781
- Created: 2020-08-19T14:32:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T08:04:02.000Z (over 4 years ago)
- Last Synced: 2025-03-15T21:14:28.318Z (over 1 year ago)
- Topics: bash, linux, settings, ubuntu
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# linux-hints
I'm fed up looking up Linux set up instructions on the internet... Time to make my own reference.
## Image stuff
### Change screenshot default folder
```
$ gsettings set org.gnome.gnome-screenshot auto-save-directory "[complete-path-to-new-directory]"
```
### Fix PDF thumbnails
```
$ sudo vim /etc/apparmor.d/local/usr.bin.evince
```
then add to end of file
```
owner /tmp/{,.}gnome-desktop-thumbnailer.* w,
```
finally `rm -rf ~/.cache/thumbnails/` for good measure and reboot.
## Name adjustments
### Change username, groupname, and ~$ dir
First kill everything (ideally you'd do this from a different user or superuser account)
```
$ sudo pkill -u [old-username]
$ sudo pkill -9 -u [old-username]
$ sudo usermod -l [new-username] [old-username]
```
Change the Home directory name
```
$ sudo usermode -d /home/[new-username] -m [new-username]
```
Change the groupname
```
$ sudo groupmod -n [new-username] [old-username]
```
### Change hostname
```
$ sudo hostnamectl set-hostname [new-hostname]
```
## Memory adjustments
### Clear cache
As superuser (sudo won't work, need to do `su` or on Ubuntu `sudo -i` then type that):
```
# echo 1 > /proc/sys/vm/drop_caches
```
### See and adjust swappiness
```
$ cat /proc/sys/vm/swappiness
$ sysctl vm.swappiness=[0-100, most recommend 10 (default is 60)]
```
### See and adjust inode cache
```
$ cat /proc/sys/vm/vfs_cache_pressure
$ sysctl vm.vfs_cache_pressure=50 (default is 100)
```
### Do both of the above permanently
Using your favorite text editor (in my case vim)
```
$ sudo vim /etc/sysctl.conf
```
at the bottom add the following lines:
```
vm.swappiness=10
vm.vfs_cache_pressure=50
```
then run this line:
```
$ sudo sysctl -p
```
## GPU
Fix for not waking up after suspend (monitor black but computer running): [`/usr/bin/nvidia-sleep.sh`](https://forums.linuxmint.com/viewtopic.php?f=49&t=361973&p=2099605&hilit=cannot+wake+from+suspend#p2099605) needs to be disabled by setting `exit 0` at the top of the file.
## Versions
OS version + Ubuntu version for Ubuntu based systems:
```
$ cat /etc/os-release
```
Debian version in Ubuntu based systems:
```
$ cat /etc/debian_version
```
## Audio
### [Noise Cancellation](https://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio)
## Websites
* [Speed up Linux Mint](https://easylinuxtipsproject.blogspot.com/p/speed-mint.html#ID1.1)
* [Disable USB webcam microphone](https://rietta.com/blog/block-webcam-audio-ubuntu-linux/)
* [Fix home directory icons](https://www.linuxquestions.org/questions/ubuntu-63/how-to-restore-default-folder-icons-4175645246/)
* [Fix suspend issue while using NVIDIA drivers](https://forums.linuxmint.com/viewtopic.php?p=1728952&sid=d2f654dfa1082400eeea98c9fbf01918#p1728952)
* [Enable persistance mode for NVIDIA](https://forums.developer.nvidia.com/t/setting-up-nvidia-persistenced/47986/11)
* [bashrc Generator](https://bashrcgenerator.com/)