basant/raw/public-kitaab/linux.wiki
2021-12-01 00:24:51 +10:00

62 lines
1.6 KiB
Plaintext

linux tips and tricks
:dev:
[[nixOS]]
= installing an app to the gnome menu =
add an desktop entry to ~/.local/share/applications/ for desktop entries available to a single user (look in that folder for examples)
= cron =
crontab -e to edit the cron file
cron takes 5 inputs followed by the CMD you wish to run:
* * * * * ls
min hour day month week
the above cron tag will run ls every minute of every day all the time. Hour is in 24hr format. So
00 00 * * * ~/scripts/music-pull
will run music-pull everyday at 12AM
its generally advisable to schedule these scripts at specific odd times so that they don't clash with other things
There are also other types of formats:
@reboot (i've run into trouble with this, as it is only called specifically when the computer is rebooted, not at any boot)
= ssh copy =
to copy your ssh key to a new computer run
ssh-copy-id <user@server>
= ssh config =
the ssh config file is truly versatile
= hamachi =
stop: /etc/init.d/logmein-hamachi stop
start: /etc/init.d/logmein-hamachi start
= git =
rename a branch:
* git branch -m <old> <new>
pull upstream master changes:
* git checkout master
* git pull https://hostname/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME
* git merge
see remote repos:
* git remote -v
add remote repo:
* git remote add <name> ssh://<user>@<ip>:<dir/of/remote>
* git remote add <name> https://<web.repo.com>:<dir/to/remote>
create a git branch:
* git branch <branch-name>
checkout a branch:
* git checkout <branch-name>
push to specific branch:
* git push --set-upstream <remote> <branch>
= systemd =
= theming =