any Linux user must have a logged name (user account) this previous must be registered on the system administrator. login name usually restricted to a maximum of 8 characters and usually in lower case. prompt of bash shell in linux using the sign "$".
Linux Command Format
standard instruction has the following format:
instructionname [options] [options]
option is the option of start with -. argument can be empty, one or more arguments (parameters). example :
$ ls | without argument |
$ ls -a | option is -a=all, without argument |
$ ls /bin | without option, argument is /bin |
$ ls /bin /etc / usr | there is 3 argument |
$ ls -l /usr | 1 option and 1 argument l= long list |
$ ls -la /bin /etc | 2 option and -a and 2 argument |
Manual
Linux provides a manual. some keyboard keys that are important in using the manual are:
Q | to exit from the program man |
<Enter> | go down, line by line |
<Space> | go down, by page |
b | go back top, 1 page |
/teks | search teks (string) |
n | continue search the previous string |
1. view of identity
$ id
2. view calender from the sistem
$ date
3. view machine identity
$ hostname
$ uname
$ uname -a
4. clear the screen
$ clear
5. manipulation file and direktori
a. view current working direktori
$ ls
b. see all complete files
$ ls -l
c. see all files and hidden direktori
$ls -f
d. display the contents of a direktori
$ls /usr
e. display the contents of root
$ ls /
6. see file tipe
$ file
$ file *
$file /bin/ls
7. copying files
a. copying theby file. specify -i of interactive question if files already exist
$ cp /etc/group
$ ls -l
$ cp -i f1 f2
$cp -i f1 f2
b. copying the file to directoy
$ mkdir backup
$ cp f1 f3
$ cp f1 f2 f3 backup
$ ls backup
$ cd backup
$ ls
8. view the contents of file
a. using cat instruction
$ cat f1
b. display the file by one full screen
$ more f1
$ pg f1
9. change file name
a. using mv instruction
$ mv f1 prog.txt
$ ls
b. moving the file to another directory.
$ mkdir mydir
$mv f1 f2 f3 mydir
c. delete the file
$ rm f1
$ cp mydir/f1 f2
$ cp mydir/f2 f2
$ rm f1
$ rm -i f2
10. restart the computer
$ reboot
or
<Ctrl> <Alt> <Del>
11. Shutdown computer
$ halt
$ shutdown
Tidak ada komentar:
Posting Komentar