0

I was wondering what this means? I know that CD stands for change directory does this take me to the home directory, if so what does $ mean?

closed as unclear what you're asking by chaos, Anthon, dhag, Eric Renouf, taliezin Oct 2 '15 at 15:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    What about adding a little context here? Where did you see this? Is it part of a larger script? If so, show more :-) – garethTheRed Sep 14 '15 at 13:41
  • Gotta love people who downvote without specifying what's wrong with question or trying to improve it. – MatthewRock Sep 14 '15 at 14:45
  • 2
    That seems to be a prompt, not a command. What does cd have to do with it? – chepner Sep 14 '15 at 14:54
3

just a guess (if you are seeing this as a prompt).

 user@host:/pathX

where

  • user (tc) your username
  • host (box) hostname of your system
  • /path (/home) current working dir (replaced by ~ in you home dir)
  • X (usually $ or # ) whether your are non root ($) or root (#).
1

What you see is command line prompt. It usually looks more or less like this:

username@hostname:yourlocation

Last character(# or $) means you're either root, or non-root.

However, you can change the prompt. The value of the prompt is held under PS1 value:

echo $PS1

You will notice many strange characters. These are some formatting characters that allow you to input things like user name or hostname, instead of hard-coding them.

You can change it yourself, if you want:

PS1="yourtext"

Note how it won't change if you set it to some ordinary string. Changing it like so will only affect it temporary - will work for your current terminal session. You can add it to your .bashrc if you want to change it (almost) permanently.

More info about customization can be found here

Not the answer you're looking for? Browse other questions tagged or ask your own question.