where to put custom aliases in terminal

Discussion in 'iPod touch 2G Jailbreak: redsn0w, 24kpwn, etc.' started by webmastir, Jul 17, 2009.

  1. webmastir

    webmastir Member

    Joined:
    Jun 23, 2009
    Messages:
    70
    Likes Received:
    0
    Device:
    2G iPod touch
    [SOLVED]where to put custom aliases in terminal

    after getting the Terminal from cydia, how do you create custom aliases? i know you can do alias='cmd' - but that's temp. i want to make em permanent. do i put em in ~/.bashrc or ~/.bash_profile ?

    thanks
  2. Shawa

    Shawa Super Moderator

    Joined:
    Jan 31, 2009
    Messages:
    3,188
    Likes Received:
    22
    Device:
    Nexus 4
    The aliases go in ~/.bash_profile. Profile is just a list of commands to be run on startup of the shell, so you can put anything to be run in there.
  3. webmastir

    webmastir Member

    Joined:
    Jun 23, 2009
    Messages:
    70
    Likes Received:
    0
    Device:
    2G iPod touch
    Thanks!

    Please Register or Log in to view images



    well, actually... i don't want it to run at startup. i want it to hold custom cmds in there, which it'll do as well, right?
  4. Universal Denizen

    Universal Denizen Member

    Joined:
    Mar 23, 2009
    Messages:
    768
    Likes Received:
    0
    Device:
    2G iPod touch
  5. Shawa

    Shawa Super Moderator

    Joined:
    Jan 31, 2009
    Messages:
    3,188
    Likes Received:
    22
    Device:
    Nexus 4
    When you type
    Code:
    alias X="Y"
    You're running a command to tell the shell that typing command X should excecute command Y for the rest of that session. .Profile is a list of commands to be run on startup.
    If you put the above command in .profile, it will run it on startup, setting X to Y.
  6. webmastir

    webmastir Member

    Joined:
    Jun 23, 2009
    Messages:
    70
    Likes Received:
    0
    Device:
    2G iPod touch
    yes, i'm aware. i read what you said wrong. i gotcha now.

    Please Register or Log in to view images



    mods: please mark this thread as solved. thanks

Share This Page