Submitted by twovests in programming (edited )

  1. Ctrl+Q. When you ctrl+S, it pauses the terminal! Ctrl+Q unpauses it.
  2. Tab: auto-complete.
  3. Up-arrow to see previous commands.
  4. ^ to do replacements. (E.g. cp my_fiel.jpg; ^fiel^file)
  5. !! The the previous command. (E.g. sudo !!)
  6. history | grep term ` To search my command history for a command I ran before.
  7. Making the history size larger in your bash profile.
  8. !1234: To re-run the 1234th command in your history.
  9. !ls: To re-run the last ls command
  10. !?ls/hmoe/home/ Re-run the last ls command, replacing hmoe with home
  11. cd .. to move up a directory.
  12. cd - to move to your previous directory.
  13. ls -lth to show a list, sorted by time, with human-readable filesizes. (E.g. 4.0K instead of 4096). (ls -lht also works)
  14. clear; python: I like to have as much vertical space as possible when I start with Python.
  15. Ctrl+C; Ctrl+D : Both tell a program to exist
  16. Ctrl+Z: Suspends a program. (Useful for returning to it)
  17. jobs: Shows lists of suspended jobs (as suspended by Ctrl+Z)
  18. fg 1: Starts job 1 back up.
  19. kill %1: Kills job 1.
  20. *: Wildcard expansion. E.g. rm archive-*.zip will delete archive-0.zip, archive-1.zip, etc. Be careful with this!
  21. !$: Represents the arguments to the last command you ran. E.g. mkdir /etc/lib/var/usr/home/bin/very/long/nested/directory; cd !$
  22. ~: Stands for your home directory.
  23. sl: Choo-choo!
  24. sl-h: Choooooo-chooooo!
6

Comments

You must log in or register to comment.

mm_ wrote

ayy thanks for these

2

twovests OP wrote

:^) i'm sure i'll have some more interesting things in the future

2

twovests OP wrote

i assumed that this was in response to my video games post and i did not even check. my previous response fit just well though :0

2

no_defun_allowed wrote

  • C-a C-k: remove text you don't like quickly
  • C-z: make the program wait
  • sudo sh -c 'rm /usr/bin/vim; ln -s /usr/bin/emacs /usr/bin/vim: yes pls
  • pkill python; rlwrap sbcl: noice
  • C-r: look backwards in history
  • fortune lambda | cowsay -f tux | lolcat: after installing lambda.txt you get a rainbow tux telling jokes
1