Ubuntu tricks
Contents
Install Jetbrains editor
Use toolbox app
Desktop file
- go to
.local/share/applications/
and create .desktop file
Running commands at startup / shutdown
- startup:
crontab -e
- example:
@reboot /home/thibault/bin/pull-blog.sh
- example:
- shutdown :
Working solution for running python script as user:
sudo vim /etc/systemd/system/backup-repos.service
|
|
sudo systemctl daemon-reload
Test with :
sudo systemctl restart backup-repos.service && sudo systemctl stop backup-repos.service && sudo systemctl status backup-repos.service
Keyboard
use setxkbmap
invert alt and win : setxkbmap -option altwin:swap_alt_win
Fn Keys
see https://askubuntu.com/questions/818413/how-can-i-toggle-the-fn-function-key
reconfigure with
|
|
Network
- port scan : nmap -p
- who’s pinging me :
sudo tcpdump -i ethX icmp
andicmp[icmptype]=icmp-echo
- who’s listening on local : sudo netstat -plnt
Storage
- Clean trash
- rm -rf ~/.local/share/Trash/*
- sudo apt-get clean
- sudo apt autoremove –purge
- sudo journalctl –vacuum-time=2d
- sudo purge-old-kernels; (nécessite package byobu)
- trash-empty
- bleach bit