Useful Linux Commands

From Research IT
Jump to: navigation, search
chsh  
will change your default shell, Need to do this on itsunix.albany.edu and change your shell there.
crontab  
maintain crontab files for individual users
df 
displays number of free disk blocks and files (use man df to get more details)
dsh - only on hal, will execute a command accros specified nodes 
dsh -n hal01-hal08 ps aux
dsh -n hal01-hal08 process  
executes the process on the specified nodes
file 
determine file type
groups 
print the groups a user is in
id 
print real and effective UIDs and GIDs
ldd 
list the shared libraries on which a given executable depends, and where they are located
printenv 
display values of environment variables
repquota -aC 
get a report of quotas
scp fn userid@yardbirds.ccr.buffalo.edu  
To Copy a file from one unix server to another use scp
sudo 
allows a permitted user to execute a command as the superuser or another user, sudo su - userid
sudo -l 
lists what you can personally do with sudo
top 
display Linux tasks
uname 
print system information
users 
print only the user names of users currently logged in to the current host
who 
show who is logged on with pid, port, time logged

/etc/auto.rithome userid 
find out where a users home directory is mounted
/etc/auto.ritlab lab 
find out where a lab directory is mounted
autoconf 
reconfig a configure file based on changed attributes

Determine which machine you are logged onto (csh shell)

if  ( "$HOST" == "matlab.rit.albany.edu" ) then 
......
endif
if  ( "$HOSTTYPE" == "x86_64-linux" ) then 
..........
endif

init.d : is the linux start up directory

---