- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: set alias
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2006 07:35 PM
12-28-2006 07:35 PM
alias cp='cp -i'
alias mv='mv -i -r'
alias rm='rm -i -f '
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-ti
lde'
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2006 07:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2006 07:57 PM
12-28-2006 07:57 PM
Re: set alias
For already existing users add alias settings into
users .profile
for new users copy /etc/skel dir to say /etc/skel_new
# cp -Rp /etc/skel /etc/skel_new
then add required alias into /etc/skel_new/.profile
while adding user use -mk /etc/skel_new
for eg.
# useradd -u
this newly created user will have all the
aliases into his .profile
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2006 09:04 PM
12-28-2006 09:04 PM
Re: set alias
/etc/profile would be the most appropriate place to put them.
But, to avoid that to be too messy, refrain from defining too many aliases as it will affect all the users who log on the system.
Another option is to have a common home directory for that particular group of users and add these aliases to the .profile file.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2006 12:10 AM
12-29-2006 12:10 AM
Re: set alias
1) Create a new group for users who will have these aliases: 'groupadd aliasgp'.
2) Assign users to this group.
3) Insert a check into /etc/profile:
if [[ "$(id -gn)x" = "aliasgpx" ]]; then ...
4) Place your aliases after this check.
5) Terminate the conditional block with 'fi'.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2006 04:16 AM
12-29-2006 04:16 AM
Re: set alias
if $(id -Gn | grep -q 'aliasgp');
then
...
fi
PCS