> For the complete documentation index, see [llms.txt](https://pedroaovieira.gitbook.io/thm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pedroaovieira.gitbook.io/thm/linux/part-1.md).

# Linux Fundamentals Part 1

## Task 1 Intro

### Read the above.

{% hint style="success" %}
No answer needed
{% endhint %}

### Deploy the machine attached to this task!

{% hint style="success" %}
No answer needed
{% endhint %}

## Task 2 Methodology

Read the above.

{% hint style="success" %}
No answer needed
{% endhint %}

## Task 3 \[Section 2: Running Commands] - Basic Command Execution

Type `echo hello`, and press enter and you'll see your input echoed back at you.

Read the above

{% hint style="success" %}
No answer needed
{% endhint %}

## Task 4 \[Section 2: Running Commands] - Manual Pages and Flags

`man <command>`

### How would you output hello without a newline

{% hint style="success" %}
echo -n hello
{% endhint %}

## Task 5 \[Section 3: Basic File Operations] - ls

What flag outputs all entries

{% hint style="success" %}
`-a`
{% endhint %}

What flag outputs things in a "long list" format

{% hint style="success" %}
-l
{% endhint %}

## Task 6 \[Section 3: Basic File Operations] - cat

### What flag numbers all output lines?

{% hint style="success" %}
-n
{% endhint %}

## Task 7 \[Section 3: Basic File Operations] - touch

Given the command `touch b.txt`, b.txt would be created.

{% hint style="success" %}
No answer needed
{% endhint %}

## Task 8 \[Section 3: Basic File Operations] - Running A Binary

How would you run a binary called hello using the directory shortcut . ?

{% hint style="success" %}
./hello
{% endhint %}

How would you run a binary called hello in your home directory using the shortcut \~ ?

{% hint style="success" %}
\~/hello
{% endhint %}

How would you run a binary called hello in the previous directory using the shortcut .. ?

{% hint style="success" %}
../hello
{% endhint %}

## Task 9 Binary - Shiba1

```
touch noot.txt
./shiba1
```

![](/files/-MOw6NWoywQYhrwF3pNP)

What's the password for shiba2

{% hint style="success" %}
pinguftw
{% endhint %}

## Task 10 su

For example if you wanted to switch to shiba2 while you're the user shiba1, you would type `su shiba2` . You would then be prompted for a password and if you entered shiba2's password you would then become shiba2

Note: Typing `su` on its own is equivalent to typing `su root`.&#x20;

### How do you specify which shell is used when you login?

{% hint style="success" %}
-s
{% endhint %}

## Task 11 Linux Fundamentals 2

Join the Linux Fundamentals 2 room, and continue your learning journey: <https://tryhackme.com/room/linux2>

{% hint style="success" %}
No answer needed
{% endhint %}
