OSXFAQ Mac OS X UNIX Tip-of-the-Day

Week 102 - Unix Commands Reference II (21 March 2005)
by
Adrian Mayo - Editor, OSXFAQ
Tuesday - Commands About and For Users
id ... display identity of the current user
Option -p to display in a more readable format
Option -G to display group numbers, useful for shell scripts
groups ... display groups to which a user belongs
(See tips week 17)
logname ... display the current user's login name
finger ... display information on a user
Create ~/.plan and ~/.project files to advertise more information to finger
passwd ... change the password of the current user
chpass, chfn, chsh, ... add or change user information
Check the man pages for compatibility with OS X
umask ... change the umask for this and child processes
(See week 47 - Wednesday)
login ... log into the machine
Option -p to inherit the current environment
rlogin ... log into a remote machine
This is depreciated in favour of the more secure 'ssh' - see under 'Networking Commands' later in the series.
su ... switch to another user's identity
sudo ... execute a command as root
Option -s to run a shell as the new user
Option -u to run as a specified user rather than root
Option -l to list what you are allowed to sudo
Options -k, -K to timeout the user's password to sudo
users ... display who is currently logged in
who ... as 'users' but with more detail
w ... as 'who' but with even more detail
whoami, who am i ... useful for amnesiacs
last ... list all logins with date, time, and status
(See tips week 17)
write ... send a message to another user
Use 'who' to list other users and their consoles
(See tips week 95 - Friday)
wall ... send a message to all logged in users
talk ... chat to another user
Use 'who' to list other users and their consoles
mesg ... allow/disallow messages from other users
If you want to learn more about Mac OS X Unix visit the Learning Center
click.
- For beginners: Mac OS X Unix Tutorials
- For detailed information on specific topics: Advanced Unix
- For OS X in gereral: Mac OS X Tutorials
|