I usually get lost when using the terminal. Because there is no address bar, I have no idea what directory I am in. To make matter worse, I use zsh shell and all it shows for what suppose to be something like /Desktop is only a %. So, I need to know where I am.
Who am I?
Just in case you get so lost in the terminal that you forget who you are, the command below will let you know the user is in control of the session, effective user id, hence, you. So, if you forget who you are (I hope not) enter:
So there you go, linux just tells you who you are!
Where am I?
So I have been cruising around in the terminal, then I forget where I am, which directory I’m in, so to find out where I am in linux, I would enter in the terminal.
I learned this from a friend, it means “Print Working Directory”, the output looks something like this
That is my current/working directory, that is where I am!
Where are you?
What if I need to locate a file in Ubuntu? For example, I need to find a file named “you.” I would use either one of the two command below
So, If I want to know where “you” is, I would enter in the terminal
This would tell me where “you” is.
Have fun messing around, you never know what you can find with these two commands.