> For the complete documentation index, see [llms.txt](https://igb.mit.edu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://igb.mit.edu/mini-courses/introduction-to-unix/getting-system-information.md).

# Getting System Information

* `uname`
  * `uname` prints various different pieces of system information. Possible pieces of information are shown in the `uname` manual pages.
  * The `-a` flag will print all the information `uname` can print.

```bash
uname -a
Linux luria 3.10.0-514.2.2.el7.x86_64 \#1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
```

* `file`
  * This will print out the file type of the given file.

```bash
file hello.txt
hello.txt: ASCII text

file my_directory.zip
my_directory.zip: Zip archive data, at least v2.0 to extract
```

* `ps`
  * Shows the running processes on the system. Pass it the argument `aux` to get extensive information about every running process on the system

<pre class="language-bash"><code class="lang-bash"><strong># Prints information on every running process on the system
</strong><strong>ps aux
</strong>
# Pipe the output into grep and search for every process being run by a specific user
ps aux | grep "asoberan"
asoberan  6342  0.0  0.0 115716  2372 pts/124  Ss   May02   0:00 /bin/bash
asoberan  7855  0.0  0.0 302216  4668 pts/124  Sl+  15:25   0:00 srun --pty bash
asoberan  7873  0.0  0.0  96680   768 pts/124  S+   15:25   0:00 srun --pty bash
</code></pre>

* `htop`
  * An interactive utility to see every running process on the system, as well as extensive information about the CPU, RAM, etc. usage on the system.
  * Useful to check this utility if you're worried about your own CPU and RAM usage on the head node.
