[SOLVED] alias

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
jesica

[SOLVED] alias

Post by jesica »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29508
Joined: Wed Jul 06, 2011 3:58 am

Re: alias

Post by xenopeek »

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
jesica

Re: alias

Post by jesica »

Thanks Vincent, I will do that
Locked

Return to “Scripts & Bash”