How to make an alias in shell?

Currently reading
How to make an alias in shell?

Last edited:
The post of the link is 12 years old now...
For gods sake Synology replaced ash with bash in DSM6.

I am not sure if /etc.defaults/profile is used, but if you do a new login to the shell and execute `set`, you will see that the last executed command was /etc.defaults/.bashrc_profile, which will execute `source ~/.bashrc` (if user profiles are enabled).

You can either enable user profiles home folder and store your aliases in ~/.bashrc or globaly add the aliases to /etc.defaults/.bashrc_profile

update: appearantly /etc.defaults/profile is used as well.
 
5
0
NAS
918+
The post of the link is 12 years old now...
For gods sake Synology replaced ash with bash in DSM6.

I am not sure if /etc.defaults/profile is used, but if you do a new login to the shell and execute `set`, you will see that the last executed command was /etc.defaults/.bashrc_profile, which will execute `source ~/.bashrc` (if user profiles are enabled).

You can either enable user profiles home folder and store your aliases in ~/.bashrc or globaly add the aliases to /etc.defaults/.bashrc_profile

update: appearantly /etc.defaults/profile is used as well.

That's a great answer, thanks.

Thanks for the details!
 
5
0
NAS
918+
The post of the link is 12 years old now...
For gods sake Synology replaced ash with bash in DSM6.

I am not sure if /etc.defaults/profile is used, but if you do a new login to the shell and execute `set`, you will see that the last executed command was /etc.defaults/.bashrc_profile, which will execute `source ~/.bashrc` (if user profiles are enabled).

You can either enable user profiles home folder and store your aliases in ~/.bashrc or globaly add the aliases to /etc.defaults/.bashrc_profile

update: appearantly /etc.defaults/profile is used as well.

Just wanted to add that editing the /etc.defaults/.bashrc_profile is the way to go if you want to make an alias as that get loaded on login. whereas /etc.defaults/profile does not.

Thanks @one-eyed-king
 
Welcome!

I came to the same conclusion yesterday evening.

Though, if you want the aliases to be user specific, you can turn on "Enable user home service" in control panel -> user -> tab "Advanced" -> section "User Home" and add your aliases in ~/.bashrc.
 
5
0
NAS
918+
Welcome!

I came to the same conclusion yesterday evening.

Though, if you want the aliases to be user specific, you can turn on "Enable user home service" in control panel -> user -> tab "Advanced" -> section "User Home" and add your aliases in ~/.bashrc.

That's a good addition, thanks.
 
1
0
NAS
DS220j
Operating system
  1. Linux
how do i install pip on a ds220j? i am looking for a solution no solution?
From all the notes below I can not understand the method to use?
 

Rusty

Moderator
NAS Support
2,463
738
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
how do i install pip on a ds220j? i am looking for a solution no solution?
From all the notes below I can not understand the method to use?
Do you have python installed via Package center? If not install it, then ssh into your nas and run:
After pip has downloaded install it:
python3 get-pip.py
You might need to move into a folder where python is installed and also depending on the version use the correct command
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Top