Results 1 to 9 of 9

Thread: Add Aliases to Your Startup

  1. #1
    Member
    Join Date
    Aug 2007
    Posts
    231

    Default Add Aliases to Your Startup

    Here are some useful ALIASes that will load automatically at startup.

    Create a file called "~/.profile" and copy the code below into it.
    Save, then run:
    CHMOD 755 .profile

    Code:
    # Useful alias commands for BASH
    unalias -a
    alias dir='dir -al --color'
    alias dirp='dir -al --color |more'
    alias copy='cp -vi'
    alias erase='rm -v'
    alias md='mkdir -v'
    alias rd='rmdir -v'
    alias ren='mv -vi'
    alias cls='clear'
    alias size='du -bs'

  2. #2
    Member
    Join Date
    Aug 2007
    Posts
    231

    Default

    I probably need to clarify for non-Linux users:

    The file is named ".profile". Notice that there is a period (.) before the name. This signifies that the file is normally hidden.

    It is created in the /root directory, AKA ~/. To get there, just enter "CD ~".

    The file can be created in Windows, or even DOS, but once it is imported into Linux, you must run DOS2UNIX to convert it to a usable Linux format. DOS uses both a carriage return and a linefeed at the end of lines, or "0D 0A" in hex, while UNIX based text files only use a linefeed, or "0A" in hex. If you used a MS-centric text editor, run this command in Linux:
    dos2unix -o .profile

    It is read at startup and it will apply to all spawned BASH shells.

  3. #3
    Developer balding_parrot's Avatar
    Join Date
    May 2007
    Posts
    3,399

    Default

    I can't help thinking that people would be better off learning those couple of linux commands, rather than making linux recognise the dos commands.

    Just my $0.02

  4. #4
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default

    Not specifically related to BT but I recently tried to setup a .profile (or maybe it was .bashrc, .bash_profile, or .bash_aliases) on a Ubuntu machine. My aliases wouldn't work when I first connected but if I launched a subshell they would. I'm sure this is something simple or stupid but I just didn't have time to futz with it. Any ideas?

    (I know I said "recently" and then couldn't remember exactly which config file it was but I'm talking like 2 months ago = recent ).

  5. #5
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Look in the General IT Discussion forum. I got a thread called colors tutorial or something like that...

    heres the link...

    http://forums.remote-exploit.org/showthread.php?t=8102

    It will tell you how to keep any name you so chose on boot up..and with colors if you want.






    REMEMBER THOUGH.....

    If you change the file in your /root directory called .bashrc its pointless and useless. YOU HAVE TO EDIT THE /etc/profile for this all to work. The file in the /root/.bashrc is EXACTLY IDENTICAL. I repeat..DON'T WASTE YOUR TIME EDITING THIS FILE!!
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  6. #6
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default

    Thanks Xploitz!

  7. #7
    Junior Member
    Join Date
    Aug 2007
    Posts
    29

    Default

    Learn something new every day.
    [FONT="Comic Sans MS"][SIZE="3"][INDENT]Knowledge is not illegal...[I]yet[/I].[/INDENT][/SIZE][/FONT]

  8. #8
    Just burned his ISO
    Join Date
    Oct 2006
    Posts
    12

    Default is there a reason

    Is there a reason modifing the .bashrc file in /root doesn't do anything?

    I modified my profile in /etc to start wpa_supplicant when I am at my home network when I type "home" and it works fine, I was just curious about the .bashrc file. Thanks!

  9. #9
    Member
    Join Date
    Aug 2007
    Posts
    231

    Default

    Quote Originally Posted by mchollan View Post
    Is there a reason modifing the .bashrc file in /root doesn't do anything?

    I modified my profile in /etc to start wpa_supplicant when I am at my home network when I type "home" and it works fine, I was just curious about the .bashrc file. Thanks!
    It probably has something to do with the order that things are read by the system. I also tried modifying it, but also to no avail (even tho the manual says that your commands will be executed).

    IIRC, the /etc/profile file is the last "profile file" read, so nothing is behind it to screw it up.

    In retrospect, all personalizations should go in /etc/profile and this is where I now place my aliases.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •