Detlef's
LINUX cheat sheet
A personal list of commands useful to know. DS
-
halt
halt system immediately
-
shutdown
regular shutdown
-
reboot
reboot immediately
-
Ctrl-Alt-F1
ASCII console
-
Ctrl-Alt-F7
back to X-windows environment
-
ps -ef
list all processes and process numbers
-
ps -ef | grep <string> look for processes containing
<string>
-
kill -9 <proc.no.> kill
process with <proc.no.>
-
find / -name "<file>" find <file> starting from
the root directory /
File access
-
chmod ugo+w <file> allow write access to <file>
for user+group+others
-
chmod 666 <file> (alternate
format of above command)
-
chmod ugo+x <dir> allow file creation
and editing on directory <dir> for ugo
-
chmod 777 <dir>
(alternate format of above command)
Secure shell
-
ssh <host>
secure shell login to host
-
ssh <user>@<host> ditto, changing user
name
-
ssh -X <host>
permit secopndary X-windows to be opened (SuSe, default for RedHat)
-
scp <localfile> <user>@<remotehost>:<filename>
secure copy
-
scp -r ...
secure copy of directory
-
sftp <user>@<host> secure ftp with
ftp-like script language
bash
-
.bashrc
start-up file with shell settings
-
PATH=$PATH:new augment
PATH with directory "new"
-
export PATH
make PATH available all over
-
source .bashrc
execute .bashrc after changes
-
env
list all environment variables
-
<VAR>=<name>
set variable <VAR> to <name>
-
alias
list all aliases
-
alias <alias>="<string>" define alias <alias>
as <string>