[SOLVED] alias

Forum rules
Before you post please read how to get help
User avatar
jesica
Level 9
Level 9
Posts: 2620
Joined: Sat Jul 18, 2009 3:54 am
Location: South Africa
Contact:

[SOLVED] alias

Postby jesica » Sat Jul 28, 2012 4:17 am

how can I setup an alias so it will be in cli everytime I start up my pc

I want to create a shutdown command

#alias s="sudo shutdown -h now"
Last edited by jesica on Sat Jul 28, 2012 5:43 am, edited 2 times in total.
Image

My Linux Counter number # 566377
Mate
IT Ninja
Happy apt-get-ing!
Linux Mint Donar # 2159


Security is the separation of an asset from a threat.

User avatar
xenopeek
Level 23
Level 23
Posts: 19709
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: alias

Postby xenopeek » Sat Jul 28, 2012 5:29 am

Edit the .profile file in your home folder (press Ctrl+H in your file manager to show hidden files like this one), and add the following line at the end:

Code: Select all

alias s="sudo shutdown -h now"
Image

User avatar
jesica
Level 9
Level 9
Posts: 2620
Joined: Sat Jul 18, 2009 3:54 am
Location: South Africa
Contact:

Re: alias

Postby jesica » Sat Jul 28, 2012 5:34 am

Thanks Vincent, I will do that
Image

My Linux Counter number # 566377
Mate
IT Ninja
Happy apt-get-ing!
Linux Mint Donar # 2159


Security is the separation of an asset from a threat.


Return to “Scripts & Bash”

Who is online

Users browsing this forum: No registered users and 1 guest