Beruflich Dokumente
Kultur Dokumente
root@nagsis:~# ls
Android-Games Music
Pictures Public
Desktop nagsis.com
Documents nagsis-Sync
Downloads Templates
root@nagsis:~# ls -l
total 40588
2. Command: cd
The Command ( cd ) for change directory, used to change the current working directory
in operating system
root@nagsis:~# cd /home/user/Desktop
3. Command: pwd
The command ( pwd ) print working directory, prints the current working directory,
usefull when you get lost.
root@nagsis:~# pwd
/home/user/Desktop
4. Command: cp
The command ( cp ) stands for copy, it copies a file from one location to another.
5. Command: mv
The ( mv ) command moves a file from one location to another location.
6. Command: touch
The ( touch ) command stands for update the access and modification times of each
fileto the current time. Creates the file, only if it doesn’t exist. If the file already exists
it will update the timestamp.
root@nagsis:~# rm file.name
Remove directories
root@nagsis:~# rm -r directory.name
8. Command: mkdir
The command ( mkdir) for Make directory create a new directory
9. Command: cat
The ( cat ) for concatenation. Print contents of a file on standard output.
....
root@nagsis:~# date
root@nagsis:~# cal
May 2013
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
root@nagsis:~# uname -a
Linux nagsis 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:36:13 UTC 2013 i686 i686 i686
GNU/Linux
13. Command: df
Report disk usages of file system. used to display the amount of available disk space
for filesystems
root@nagsis:~# df
14. Command: du
Estimate file space usage. Output the summary of disk usages by ever file
hierarchically, i.e., in recursive manner.
root@nagsis:~# du
8 ./Daily Pics/wp-polls/images/default_gradient
8 ./Daily Pics/wp-polls/images/default
32 ./Daily Pics/wp-polls/images
8 ./Daily Pics/wp-polls/tinymce/plugins/polls/langs
8 ./Daily Pics/wp-polls/tinymce/plugins/polls/img
28 ./Daily Pics/wp-polls/tinymce/plugins/polls
32 ./Daily Pics/wp-polls/tinymce/plugins
36 ./Daily Pics/wp-polls/tinymce
36 ./Plugins/wordpress-author-box
16180 ./Plugins
root@nagsis:~# uptime
root@nagsis:~# whoami
root
root@nagsis:~# w
root@nagsis:~# whereis ls
root@nagsis:~# history
10 pwd
12 cd /usr/share/unity/icons/
13 cd /usr/share/unity
/home/user/tmp/file.name
./Desktop/load.sh
./Desktop/test.sh
./Desktop/shutdown.sh
./Binary/firefox/run-mozilla.sh
./Downloads/kdewebdev-3.5.8/quanta/scripts/externalpreview.sh
./Downloads/kdewebdev-3.5.8/admin/doxygen.sh
./Downloads/kdewebdev-3.5.8/admin/cvs.sh
./Downloads/kdewebdev-3.5.8/admin/ltmain.sh
./Downloads/wheezy-nv-install.sh
Note: For no case sensitive. You can use the `-iname‘ option to find something.
root@nagsis:~# find -iname *.SH ( find -iname *.Sh / find -iname *.sH)
./Desktop/load.sh
./Desktop/test.sh
./Desktop/shutdown.sh
./Binary/firefox/run-mozilla.sh
./Downloads/kdewebdev-3.5.8/quanta/scripts/externalpreview.sh
./Downloads/kdewebdev-3.5.8/admin/doxygen.sh
./Downloads/kdewebdev-3.5.8/admin/cvs.sh
./Downloads/kdewebdev-3.5.8/admin/ltmain.sh
./Downloads/wheezy-nv-install.sh
/var/www/modules/update/tests/aaa_update_test.tar.gz
./var/cache/flashplugin-nonfree/install_flash_player_11_linux.i386.tar.gz
./home/server/Downloads/drupal-7.22.tar.gz
./home/server/Downloads/smtp-7.x-1.0.tar.gz
./home/server/Downloads/noreqnewpass-7.x-1.2.tar.gz
./usr/share/gettext/archive.git.tar.gz
./usr/share/doc/apg/php.tar.gz
./usr/share/doc/festival/examples/speech_pm_1.0.tar.gz
./usr/share/doc/argyll/examples/spyder2.tar.gz
./usr/share/usb_modeswitch/configPack.tar.gz
nagsis:x:1000:1000:Nagsis,,,:/home/nagsis:/bin/bash
root@nagsis:~# ps
To list status of all the processes along with process id and PID, use option ‘-A‘.
root@nagsis:~# ps -A
1 ? 00:00:01 init
2 ? 00:00:00 kthreadd
3 ? 00:00:01 ksoftirqd/0
5 ? 00:00:00 kworker/0:0H
7 ? 00:00:00 kworker/u:0H
8 ? 00:00:00 migration/0
9 ? 00:00:00 rcu_bh
....
This command is very useful when you want to know which processes are running or
may need PID sometimes, for process to be killed. You can use it with ‘grep‘ command
to find customised output. For example,
Find process postfix, note its pid and kill it. For example, in my case postfix pid is
‘1285‘.
# ping www.teknixx.com
# traceroute 23.229.227.194
# netstat -r
# hostname
teknixx.com
;; Got answer:
;; ->>HEADER<
# nslookup www.teknixx.com
Server: 11.8.88.1
Address: 11.8.88.1#53
Non-authoritative answer:
Name: teknixx.com
Address: 23.229.227.194
# arp -e
# telnet teknixx.com 80
40. Command: su
The command ( su ) become root .
[root@teknixx~]# su smith