[SOLVED] alias

Forum rules
Before you post please read how to get help

[SOLVED] alias

Postby jesica on 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
jesica
Level 9
Level 9
 
Posts: 2633
Joined: Sat Jul 18, 2009 3:54 am
Location: South Africa

Linux Mint is funded by ads and donations.
 

Re: alias

Postby xenopeek on 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"
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15434
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: alias

Postby jesica on 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.
User avatar
jesica
Level 9
Level 9
 
Posts: 2633
Joined: Sat Jul 18, 2009 3:54 am
Location: South Africa


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 0 guests