sh shell (not
bash), which command in Linux/UNIX prints out my current directory?
$ *showmewhereiam* /sys/kernel/debug $
While the general answer is
For instance, if you have a directory called
To show the real underlying directory, use either
$ mkdir real $ ln -s real virtual $ cd virtual $ pwd /home/username/tmp/virtual $ pwd -P /home/username/tmp/real $ readlink -f . /home/username/tmp/real
Note that shells often replace the
As others said,
On all shells in common use today, you're able to customize the appearance of the command prompt. I like to customize mine so that it shows me both the name of the computer I'm on and my working directory. That way, I always know where I am. (The computer name part helps me realize if the terminal window I'm using has been used to SSH into a remote server.) For example, when I open a new terminal window on my laptop, which I call Plastico, I see this:
You can see that it's abbreviating my home directory as
On tcsh, I do this by adding
Edit: Just noticed the OP states you're interested in sh, not bash. Oh well; hope folks find this useful regardless.