Question: I tried to login to Ubuntu 12.04 but each time I get back to the login screen, I've tried (Ctrl+Alt+F1) to try console mode but after giving my login/password the message incorrect login appears, so I tried recovery mode 
the FS is mount with read only i changed it to rw :

```
mount -o remount,rw /

```

return to the login screen and nothing happened.
I changed /etc/fstab options from errors=remount-ro to rw, reboot the system and the problem persist
Any help please, I need an explanation to this issue if possible.
Many thanks

Answer: 
**TL;DR** Variables in Linux start with the `$`.

---

The command is

```
echo $HOME

```

If you type in

```
printenv

```

it will show you all the variables and what they equal.

Or

```
printenv | grep '^HOME='

```

or a few more you can try:

```
terrance@terrance-ubuntu:~$ echo ~
/home/terrance
terrance@terrance-ubuntu:~$ printf "%b \n" ~
/home/terrance 
terrance@terrance-ubuntu:~$ printf "%b \n" $HOME
/home/terrance 

```
To print an environment variable you should use the `$` sign before. So what you are doing in 

```
echo home

```

this will just print the word home since the shell will not expand the variable home since it's not started with `$` sign, and it should be capitalized.

So to have the output you should run:

```
echo $HOME

```

To list all environment variables you can use the command `env`.

Also you can get the same result of `echo $HOME` by running the command:

```
env | grep '^HOME'

```

**Now** there is some cases when you create a new user without home directory, this may happen if you use the command `useradd` without the `-d` option or without declaring the variables `HOME_DIR` and `BASE_DIR`. So if you create this user using the `useradd` command this would be the case.

Some useful links:

* [How to add users in Ubuntu](https://help.ubuntu.com/community/AddUsersHowto)
* [What are environment vaiables](https://help.ubuntu.com/community/EnvironmentVariables)