Useful Linux Tools

Useful Linux Tools

Version control: git

Source code browsing


- tmux: start a new tmux session
- Ctrl-b %: split a pane vertically
- Ctrl-b ": split a pane horizontally
- Ctrl-b o: move to the next pane
- Ctrl-b z: zoom (or unzoom) a pane
- Ctrl-b c: create a new window
- Ctrl-b N: go to window N (0~9)
- Ctrl-b d: detach from a session
- tmux a: attach to an existing session

Debugging: gdb

$> make
$> gdb --args ./unit_tests "[parser]" # run gdb for a command
gdb> b parser.cpp:100             # set a breakpoint at Line 100 in parser.cpp
gdb> run                          # actually run ./unit_tests
gdb> layout src                   # When the break point hits,
                                  # press Ctrl-x Ctrl-a to see the source code
gdb> n                            # next
gdb> s                            # step into
gdb> p VAR                        # print VAR
gdb> p *ADDR                      # print the contents at ADDR
gdb> quit                         # quit

struct padding: pahole

Performance profiling: perf and ftrace

Documentation: markdown


Graph: gnuplot or matplotlib

Better terminal environment

  • tilix: simple a better tiling terminal than gnome-terminal
  • mosh: a better replacement of ssh
  • hack-fonts: beautiful fixed-width font for source code