Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

A possible file in which to write a system wide alias.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
stf92
Posts: 41
Joined: 2018-05-27 20:16

A possible file in which to write a system wide alias.

#1 Post by stf92 »

Hi: I used a non Debian linux distribution and, writing an alias in /etc/profile had system wide effect. Now with Debian 9 an alias in that file has effect only under root. A possible file in which to write an alias such that it is valid for all users including root?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: A possible file in which to write a system wide alias.

#2 Post by bw123 »

resigned by AI ChatGPT

Bulkley
Posts: 6382
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: A possible file in which to write a system wide alias.

#3 Post by Bulkley »

bw123 is correct. For example, in ~/.bashrc I have added alias sx="startx" under # some more ls aliases. It looks like this:

Code: Select all

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
alias sx="startx"

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: A possible file in which to write a system wide alias.

#4 Post by None1975 »

Bulkley wrote:bw123 is correct. For example, in ~/.bashrc I have added alias sx="startx" under # some more ls aliases.
You may want to put all your additions into a separate file like

Code: Select all

 ~/.bash_aliases
instead of adding them directly in

Code: Select all

 .bashrc
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: A possible file in which to write a system wide alias.

#5 Post by debiman »

FYI:
there is a user by that alias on linuxquestions.org.
people have been very patient and polite for decades (since 2007), but recently more and more complaints came in that stfu92 is actually some sort of troll, never doing the slightest bit of research, indulging in complainerism etc.
i think it's no coincidence that we find the same alias here right now at this juncture in the train of events...

stf92
Posts: 41
Joined: 2018-05-27 20:16

Re: A possible file in which to write a system wide alias.

#6 Post by stf92 »

If I use ~/.bashrc then the alias will have effect for the user to which that file belongs. I.e., suppose I am user_1. Then writing the alias in /home/user_1/.bashrc will have effect only for user_1 and not for root. Isn't the meaning of "system wide" not known here?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: A possible file in which to write a system wide alias.

#7 Post by bw123 »

resigned by AI ChatGPT

Post Reply