# command line tools

In this part, we will give brief tutorials on some useful CLI tools.

## tmux

Tmux is installed on all nodes. It can keep some interactive sessions running even the ssh connection is off.

The very basics of tmux (for more information and commands, please google or `man tmux`).

`tmux`: open a new session of shell

`Ctrl-B D`: detach the tmux session and go back to the ssh bash shell

`Ctrl-D`: kill the tmux shell session

`tmux ls`: list all active tmux sessions

`tmux attach [-t no or name]`: go back to tmux session given no.

`Ctrl+B [`: move the screen in tmux session, enter vim mode

`q`: quit the above vim mode

`Ctrl+B $`: rename current session.

`Ctrl+B %`: to split the session

`Ctrl+B O`: move focus on different sessions.

`Ctrl+B x`: kill current panel

`Ctrl+B z`: maximize current panel

`Ctrl+B :setw synchronize-panes`: input the same command on multiple panels, [ref](https://sanctum.geek.nz/arabesque/sync-tmux-panes/)

One can also further customize the configuration of tmux, one conf example can be found [here](https://github.com/gpakosz/.tmux#enabling-the-powerline-look), remember using `tmux source-file ~/.tmux.conf` to reload the config.

## z

auto jump to directories without full path, [repo](https://github.com/rupa/z)

To use z, add the following line in `~/.bashrc`

`. /home/ubuntu/softwares/z/z.sh`

And that is all (Note the space in between).

## tldr

If you are not interested in the large manual file provided by `man <command>`, try `tldr <command>` for a quick and simple cheatsheet.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://refraction-ray.gitbook.io/iastuhpc2/users/softwares/cli-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
