Professional Documents
Culture Documents
Basic shell
Commands
cd D
pwd
ls
ls al
mv A B
cp A B
chmod u+x F
rm F
rmdir D
rm rf D
mkdir D
cat F
less F
grep EXP F
man C
.
..
~tr1
Environment variables
The user can define environment variables.
X=test
X=test testy
export X=test
Example:
export PATH=.:/usr/bin:/bin
Set the PATH variable the shell will search the executables first in the current
directory, then in /usr/bin, and them in /bin. The PATH variable will be inherited in all
child processes.
Processes
Processes are identified by their process id (pid). It is an integer value between 1 and
65535.
Commands
ps -eaf
ps eaf | grep $USER
top
kill -9 PID
pmap PID
g++ -c test.cpp
gmake
gmake 2>&1 | less
gdb test
gdb test core_file
Vi editor
Commands
:x
:q!
i
a
ESC
arrows
/test
n
x
dd
u
:0
:n
G
^
$
:set list
yy
5yy
p