# Linux / Unix

### Setup SSH Tunnel

```
// use -p only if the ssh port is different to the default 22
ssh -i ~/.ssh/id_rsa_XXX -p 4422 -L 8080:localhost:8080 User@ServerOrIp
```

### How to Change Hostname on Ubuntu 18.04

```
sudo hostnamectl set-hostname linuxize
```

### Add a network interface alias

{% tabs %}
{% tab title="Linux" %}

```
sudo ifconfig lo:0 10.254.254.254 netmask 255.255.255.0 up
```

{% endtab %}

{% tab title="MacOS" %}

```
sudo ifconfig lo0 alias 10.254.254.254
```

{% endtab %}
{% endtabs %}

### How to count all files extension

```
find . -type f | sed -n 's/..*\.//p' | sort | uniq -c
```

### Grep in file content which is in zip archive&#x20;

```
unzip -p archive.zip filenam* | grep search_str
```


---

# 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://wiki.zeacom.de/devops/add-a-network-interface-alias.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.
