# Viewing with Hex Editor

In order to analyze the file system, we have to view it using hexadecimal editor.

There are two common hex editors in Ubuntu:

* hexedit
* xxd

Now try to view the disk file by hexedit. If you haven't unmount it, do it now.

In the terminal,

```
$ hexedit test.disk
```

![](/files/-Lp-5bN3bv52RU6TI9G3)

There are three columns in the output:

1. Line number in hexadecimal
2. Content in Hexadeciaml
3. Content in ASCII

For one hex digit, 4 bits (2^4 = 16) are needed to represent 0-15(0-F). Two hex digits occipies 8bits = 1 byte, therefore they are in group of two.


---

# 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://eric-lo.gitbook.io/lab9-filesystem/important-commands/viewing-with-hex-editor.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.
