NOTE: MORE ITEMS WILL BE ADDED TO THIS LIST
Today I decided to keep a Linux cheat sheet around to avoid looking up some common tasks on Google. I keep forgetting some commands and I feel like I should get them tattooed somewhere on the back of my hand so that I wouldn’t forget them. Although this list is currently very short, I will keep adding new stuff to it.
Program Specific:
Git:
git submodule update --remote --mergeScreen:
screen -S [SESSION NAME]Ctrl + A ; :sessionname [NEW SESSION NAME]screen -lsAttach to a session
screen -r [SESSION NAME]Detach from window:
Ctrl + A ; DExit screen:
Ctrl + A ; \nvidia-xconfig:
sudo nvidia-xconfig --enable-all-gpussudo nvidia-xconfig --cool-bits=28Fail2ban:
fail2ban-client set [JAIL NAME] unbanip [IP ADDRESS]Script Related:
- Put the script/command in
/etc/rc.local - Put the script/command in
/etc/crontabwith@reboot [USERNAME] [COMMAND]
[PROGRAM] |& tee output.txtCommands:
File and Directory Management:
ln -s [TARGET] [LINK NAME]cd -rsync -az --progress [USERNAME]@[REMOTE HOST]:[REMOTE PATH] [LOCAL PATH]Searching:
find [START PATH] -name [NAME OF FILE]Find a directory:
find [START PATH] -type d -name [NAME OF DIRECTORY]grep -Ril "[TEXT TO FIND]" [START PATH]User Management:
groupsAdd user to the list of sudoers:
sudo adduser [USERNAME] sudoRun program as another user:
su [USERNAME] -c "[COMMAND TO RUN]"
Recent Comments