brd91
Posts: 7
Joined: Thu Jan 26, 2017 7:55 pm

How to create an alias on Solus

Thu Feb 23, 2017 9:37 pm

Hi everyone,

I've a problem for create an alias on Solus, when I open the file .bashrc to write my alias, I notice that there is nothing in this file except the line : "source : usr/share/defaults/etc/profile".
Even if I try to create the alias and save, nothing is happening, and terminal doesn't know the alias.

Can anyone help me please ?

User avatar
kyrios
Posts: 1851
Joined: Thu Sep 22, 2016 4:20 pm

Re: How to create an alias on Solus

Thu Feb 23, 2017 9:51 pm

Did you add your alias before usr/share/defaults/etc/profile" ?

brd91
Posts: 7
Joined: Thu Jan 26, 2017 7:55 pm

Re: How to create an alias on Solus

Thu Feb 23, 2017 9:55 pm

What does it mean ? How can I add my alias before ?

brd91
Posts: 7
Joined: Thu Jan 26, 2017 7:55 pm

Re: How to create an alias on Solus

Thu Feb 23, 2017 11:01 pm

Ok I'm stupid, I started again by putting my command line just before the line you said and it works !

Thanks a lot dude !


yellowbean
Posts: 3
Joined: Sat Nov 18, 2017 8:58 pm

Re: How to create an alias on Solus

Sat Nov 18, 2017 9:06 pm

I'm digging out this post because I can't create an alias in bash in solus

I'm writing in root/.bashrc before the source line:

alias py='python3'

I don't know why it doesn't work, If someone have an hint It will be awesome :)

have a nice day !

Girtablulu
Posts: 4
Joined: Sun Oct 08, 2017 4:52 pm

Re: How to create an alias on Solus

Sat Nov 18, 2017 11:20 pm

yellowbean wrote:
Sat Nov 18, 2017 9:06 pm
I'm digging out this post because I can't create an alias in bash in solus

I'm writing in root/.bashrc before the source line:

alias py='python3'

I don't know why it doesn't work, If someone have an hint It will be awesome :)

have a nice day !
I personally use a dedicated alias file,

so create a .bash_aliases

you can add you aliases there

inside the .bashrc add this

Code: Select all

if [ -f ~/.bash_aliases ];then
    . ~/.bash_aliases
fi

User avatar
Justin
Development Team
Posts: 3613
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: How to create an alias on Solus

Sun Nov 19, 2017 8:55 am

yellowbean wrote:
Sat Nov 18, 2017 9:06 pm
root/.bashrc before the source line:
Are you talking /root/.bashrc or ~/.bashrc?

Inast1984
Posts: 1
Joined: Fri Nov 17, 2017 12:36 pm

Re: How to create an alias on Solus

Mon Nov 20, 2017 9:26 am

Would be nice to see some videos! It would be easier for us!! or at least it would be easier for me for sure! especially now that i'm on growth hormone and it seems my focusing is below average right now.
Last edited by Inast1984 on Mon Dec 18, 2017 9:09 pm, edited 2 times in total.

yellowbean
Posts: 3
Joined: Sat Nov 18, 2017 8:58 pm

Re: How to create an alias on Solus

Thu Nov 23, 2017 7:37 pm

Justin wrote:
Sun Nov 19, 2017 8:55 am
yellowbean wrote:
Sat Nov 18, 2017 9:06 pm
root/.bashrc before the source line:
Are you talking /root/.bashrc or ~/.bashrc?
Yes thank you I was in root, I did it in ~/bashrc and it work ! dumb me ^^

Thank for the help and thank you for showing me how to make a dedicate file to alias :)

Have a good day everyone

Return to “Tutorials”