> For the complete documentation index, see [llms.txt](https://devops-3.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devops-3.gitbook.io/devops/docs/module-1-linux-introduction/ubuntu-based-commands.md).

# Ubuntu Based Commands

This section will explore basic ubuntu commands for file and directory management.

1. sudo command

```bash
sudo (command)
Ex: sudo useradd username
```

**Superuser do** or **sudo** is one of the most basic commands in Linux. It runs your command with administrative or root permissions.&#x20;

When you run a sudo command, Terminal will request the root password. For example, this snippet runs **useradd** with the superuser privilege.

2. su command

```bash
su [options] [username [argument]]
```

The **su** command lets you run a program in the Linux shell as a different user. It is useful to connect via SSH while the root user is disabled.

3. htop command

```bash
htop [commands]
```

The **htop** command is an interactive program for monitoring system resources and server processes. Unlike **top**, it offers additional features like mouse operation and visual indicators.

4. hostname command

```bash
hostname [option]
```

Run the **hostname** command to display the system’s hostname.

5. systemctl command

```bash
systemctl [commandname] [service_name]
```

The **systemctl** command lets you manage installed services in your Linux system.

To use the command, the user must have **root** privilege. It has several use cases, including starting, restarting, and terminating a service. You can also check a service’s status and dependencies.

6. apt-get command

```bash
apt-get [options] (command)
```

**apt-get** is a command line tool for handling Advanced Package Tool (APT) libraries in Debian-based Linux, like Ubuntu. It requires **sudo** or **root** privileges.

This Linux command lets you manage, update, remove, and install software, including its dependencies.

7. history command

```bash
history
Ex: !255
```

Enter **history** to list previously executed commands. It lets you reuse the commands without rewriting them. To use it, enter this syntax with sudo privileges.

8. ifconfig command

```bash
ifconfig
```

The **ifconfig** command lets you list and configure your system’s network interface. In newer Linux distros, it is equivalent to the **ip** command.

9. scp command

{% code overflow="wrap" %}

```bash
scp [option] [source username@IP]:/[directory and file name] [destination username@IP]:/[destination directory]
```

{% endcode %}

The **scp** command securely copies files or directories between systems over a network.

10. &#x20;curl command

```bash
curl [option] URL
```

The **curl** command transfers data between servers. Its common usage is for retrieving a web page’s content to your system using its URL.

{% hint style="info" %}
For explore more commands search for ubuntu based commands.
{% endhint %}
