# Variables

Variables are the containers which store data or a useful piece of information as the value inside them.

```bash
Variable-name="Variable-value"
```

Set variable   name="DevOps"

```sh
#!/bin/bash

# Variable set
name=”DevOps”

# Print value
echo “$name”

```

Variable is known as the temporary storage for any kind of data like integer, float, char, etc.&#x20;

A variable name can include **alphabets, digits, and underscore**, and its name can be started with alphabets and underscore only.

### System Variables

These are the pre-defined variables as they are created and maintained by the LINUX operating system itself.&#x20;

Their standard convention is that generally they are defined in capital letters, i.e., UPPER\_CASE.&#x20;

So whenever you see a variable defined in upper cases, most likely, they are the system-defined variables.

```bash
$PWD
```

Sample Script

```bash
#!/bin/bash
echo $HOME
echo “$HOSTNAME”
echo “$UID”
```

### Export Variables

export command makes the variable available to all the subsequent commands executed in that shell.

```bash
export name=”devops”
```

Sample Script

It changes your terminal name into DevOps Engineer.

```bash
export ps1=”DevOps Engineer$”
```
