Submitted by DJ KING on Thu, 19/08/2004 - 07:33.
GNU/Linux Command Line session (1) :
In GNU/Linux everything is a file ... All configurations have files Using the text mode on GNU/Linux Operating System is pretty light .. The following figure shows how does the system work on your GNU/Linux Operating System ( User - Utility - !Shell - Kernel - Hardware )
We have to types of Termianls :
- Virtual Terminal ---> cause there is no other machine ( as in figure 2 ) " A mainframe with terminals "
2 -Terminal Emalaturs ( Pesudo ) ---> from the GUI ( Graphical User Interface )
tty , pts :
try using the command tty from any GUI terminal ( pesudo ) , most probably you'll get something like : /dev/pts1 or /dev/pts now use the terminals through Alt+Ctrl+F1 .... F6
The general form of any command is like :
[] == argument
$ls -la
$ls –list
$ls --almost -list
$ls -h!( h : for human readable )
ls -k is your friend ..
$man -k
What manual page do you want?
usage of man -k is something like :
$man -k kernel
$man -k copy
$man -k delete
so you can get use of it when you don't know the specific command to get it's manual directly like
$man cp
( the copying command )
$man mv
( the moving "deleting command - or renaming )
man is the short name of manual
and you can use the command info as well which is a documention browsing system
- ___/
- |
- |___/bin
- |
- |___/boot
- |
- |___/dev
- |
- |___/etc
- |
- |___/home
- |
- |___/initrd
- |
- |___/lib
- |
- |___/lost+found
- |
- |___/media
- |
- |___/mnt
- |
- |___/opt
- |
- |___/proc
- |
- |___/root
- |
- |___/sbin
- |
- |___/srv
- |
- |___/sys
- |
- |___/tmp
- |
- |___/usr
- |
- |___/var
$man cp( the copying command )
$man mv( the moving "deleting command - or renaming )
man is the short name of manual and you can use the command info as well which is a documention browsing system
- ___/
- |
- |___/bin
- |
- |___/boot
- |
- |___/dev
- |
- |___/etc
- |
- |___/home
- |
- |___/initrd
- |
- |___/lib
- |
- |___/lost+found
- |
- |___/media
- |
- |___/mnt
- |
- |___/opt
- |
- |___/proc
- |
- |___/root
- |
- |___/sbin
- |
- |___/srv
- |
- |___/sys
- |
- |___/tmp
- |
- |___/usr
- |
- |___/var
Old School ASCII Graphics ;)
the famous command cd
$cd .." Up "
$cd -" Back"
the famous command cd
$cd ..
" Up "
$cd -
" Back"
Touch command ..
$touch oct-{first,second,third,fourth}-{1,2,3,4,5,6,7}
$ls oct*
$ls oct-fourth*
$touch oct-{first,second,third,fourth}-{1,2,3,4,5,6,7}
$ls oct*
$ls oct-fourth*
for more information about the “ tocuh “ command
$man touch;)
cp ( the copying command )
cp OPTION... SOURCE DEST
cp OPTION... SOURCE... DIRECTORY
$cp -F
( F: Force )
$cp -R
( R: Recursive )
$cp -rf
( recursive and force )
pwd : print working directory
$ pwd
/home/slacker
some other commands you may find it usefull ..
which :
shows the full path of (shell) commands.
$which mozilla
/usr/bin/mozilla
>
whereis :
whereis locates source/binary and manuals sections for specified files
$whereis mozilla
mozilla: /usr/bin/mozilla /usr/lib/mozilla /usr/local/mozilla /usr/share/man/man1/mozilla.1.bz2
who :
tells who is logged on
whatis :
hatis searches a set of database files containing short descriptions
of system commands for keywords and displays the result on the standard
output. Only complete word matches are displayed.
$whatis mozilla
mozilla (1) - a Web browser for X11 derived from Netscape Communicator
whoami
print efictive userid same as id -un
$whoami
slacker
$id -un
slacker
env
print envairounment values
try it on your machine cause the result is long to be copied in here ..
echo : display a line of text
$echo $SHELL
/bin/bash
$echo $PATH
/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/home/slacker/bin
$echo GO $USER
GO slacker
;)
$echo DJ KING IS A $USER
DJ KING IS A slacker
= )
$echo YOU NEVER KNOW == MohammedSameer
YOU NEVER KNOW == MohammedSameer
GNU/Linux is fun .. isn't it ? ;)
$which mozilla
/usr/bin/mozilla>
whereis :
whereis locates source/binary and manuals sections for specified files
$whereis mozilla
mozilla: /usr/bin/mozilla /usr/lib/mozilla /usr/local/mozilla /usr/share/man/man1/mozilla.1.bz2
who :
tells who is logged on
whatis :
hatis searches a set of database files containing short descriptions
of system commands for keywords and displays the result on the standard
output. Only complete word matches are displayed.
$whatis mozilla
mozilla (1) - a Web browser for X11 derived from Netscape Communicator
whoami
print efictive userid same as id -un
$whoami
slacker
$id -un
slacker
env
print envairounment values
try it on your machine cause the result is long to be copied in here ..
echo : display a line of text
$echo $SHELL
/bin/bash
$echo $PATH
/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/home/slacker/bin
$echo GO $USER
GO slacker
;)
$echo DJ KING IS A $USER
DJ KING IS A slacker
= )
$echo YOU NEVER KNOW == MohammedSameer
YOU NEVER KNOW == MohammedSameer
GNU/Linux is fun .. isn't it ? ;)
$whatis mozilla
mozilla (1) - a Web browser for X11 derived from Netscape Communicator
whoami
print efictive userid same as id -un
$whoami
slacker
$id -un
slacker
env
print envairounment values
try it on your machine cause the result is long to be copied in here ..
echo : display a line of text
$echo $SHELL
/bin/bash
$echo $PATH
/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/home/slacker/bin
$echo GO $USER
GO slacker
;)
$echo DJ KING IS A $USER
DJ KING IS A slacker
= )
$echo YOU NEVER KNOW == MohammedSameer
YOU NEVER KNOW == MohammedSameer
GNU/Linux is fun .. isn't it ? ;)
- Printer-friendly version
- Login or register to post comments
- 6988 reads

