Linux: BASH Shell Misc Tips

By Xah Lee. Date:

How to find the exit code of last shell command?

In bash, echo $? prints the exit code of last command.

when you type kill in terminal, is it calling bash builtin or /bin/kill?

If you are using bash, type type kill to find out.

In Ubuntu 12.04, clearly it's calling the bash version. You can confirm by comparing the output of:

kill -l

/bin/kill -l

How do i start bash without loading any init files?

bash --noprofile --norc

See also: Difference Between .bashrc, .profile, .bash_profile, …?.

How to do set font for xterm?

In xterm, hold Ctrl then right click to change font size. Also, Left and middle click change other options.

Bash/Terminal Topic

  1. Bash Keys, Terminal Keys, Man Page Keys
  2. Bash Prompt Setup
  3. Bash Color Prompt
  4. .bashrc, .profile, .bash_profile
  5. Virtual Console
  6. Terminal Control Sequence Keys
  7. Reset Terminal
  8. tmux
  9. man page
  10. Bash Manual in Chapters
  11. BASH Shell Misc Tips
  12. Log Terminal Session

If you have a question, put $5 at patreon and message me.