#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    87
    Rep Power
    5

    Changing Directory


    Hi folks

    I am currently working with a mac just now and I am using mac terminal. Currently it is flashing localhost :~ myAdminname.

    So I am wondering what commands you use to change the directory from localhost :~ to "computer :~" which is the name of my computer.

    I have figured out that you use the sudo command for this but not entirely sure how to do this?

    I will also eventually try to find my php.ini file on my mac as I currently can't find it anywhere? So any help with that would be great too.

    cheers
    volterony
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,141
    Rep Power
    9398
    "localhost" is the name of the machine. "~" is the current directory (and a tilde represents your home directory).

    To change directories use "cd" like
    Code:
    localhost:~ volterony$ cd Documents/
    Read this.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    87
    Rep Power
    5
    Originally Posted by requinix
    "localhost" is the name of the machine. "~" is the current directory (and a tilde represents your home directory).

    To change directories use "cd" like
    Code:
    localhost:~ volterony$ cd Documents/
    Read this.
    Thanks requinix for helping me.

    Cool. I understand the cd command.

    When I look in finder under devices, there is an icon called 'computer', so would that not be the name of my machine? I am somehow thinking that I am running localhost as root?

    If in fact localhost is the name of my machine, is there a way to change the name?

    cheers
    volterony
  6. #4
  7. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,141
    Rep Power
    9398
    Originally Posted by volterony
    When I look in finder under devices, there is an icon called 'computer', so would that not be the name of my machine? I am somehow thinking that I am running localhost as root?

    If in fact localhost is the name of my machine, is there a way to change the name?
    Both good questions, and both Mac questions. I can't help you there.

    If the Terminal has a $ character in the prompt (like it did in the bit I posted) then you are not root. If it has a # instead then you could very well be.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    87
    Rep Power
    5
    Originally Posted by requinix
    Both good questions, and both Mac questions. I can't help you there.

    If the Terminal has a $ character in the prompt (like it did in the bit I posted) then you are not root. If it has a # instead then you could very well be.
    Cheers Requinix. I'll do a bit more research.

IMN logo majestic logo threadwatch logo seochat tools logo