Linux စတင္ေလ့လာသံုးစြဲမယ့္သူေတြအတြက္ Linux Basic Command ေတြကို စုေဆာင္းေဖၚျပေပးလိုက္ပါတယ္.. တကယ္ေတာ့ ဒီ Command ေတြကို ကၽြန္ေတာ္လည္း အလြတ္မရဘူးဗ်..:P
mkdir – make directories
Usage: mkdir [OPTION] DIRECTORY…
eg. mkdir lhn
Usage: ls [OPTION]… [FILE]…
eg. ls, ls l, ls lhn
Usage: cd [DIRECTORY]
eg. cd lhn
Usage: pwd
Usage: vim [OPTION] [file]…
eg. vim lhn.txt
Usage: cp [OPTION]… SOURCE DEST
eg. cp sample.txt sample_copy.txt
cp sample_copy.txt target_dir
Usage: mv [OPTION]… SOURCE DEST
eg. mv source.txt target_dir
mv old.txt new.txt
Usage: rm [OPTION]… FILE…
eg. rm file1.txt , rm rf some_dir
Usage: find [OPTION] [path] [pattern]
eg. find file1.txt, find name file1.txt
Usage: history
Usage: cat [OPTION] [FILE]…
eg. cat file1.txt file2.txt
cat n file1.txt
Usage: echo [OPTION] [string] …
eg. echo I love India
echo $HOME
Usage: grep [OPTION] PATTERN [FILE]…
eg. grep i apple sample.txt
Usage: wc [OPTION]… [FILE]…
eg. wc file1.txt
wc L file1.txt
Usage: sort [OPTION]… [FILE]…
eg. sort file1.txt
sort r file1.txt
Usage: tar [OPTION] DEST SOURCE
eg. tar cvf /home/archive.tar /home/original
tar xvf /home/archive.tar
Usage: kill [OPTION] pid
eg. kill 9 2275
Usage: ps [OPTION]
eg. ps, ps el
Usage: who [OPTION]
eg. who , who b , who q
Usage: passwd [OPTION]
eg. passwd
Usage: su [OPTION] [LOGIN]
eg. su remo, su
Usage: chown [OPTION]… OWNER[:[GROUP]] FILE…
eg. chown remo myfile.txt
Usage: chmod [OPTION] [MODE] [FILE]
eg. chmod 744 calculate.sh
Usage: zip [OPTION] DEST SOURSE
eg. zip original.zip original
Usage: unzip filename
eg. unzip original.zi
“ssh is a program for logging into a remote machine and for
executing commands on a remote machine”
Usage: ssh [options] [user]@hostname
eg. ssh X guest@10.105.11.20
“scp copies files between hosts on a network”
Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]
eg. scp file1.txt guest@10.105.11.20:~/Desktop/
eg. sudo fdisk l
Usage: mount t type device dir
eg. mount /dev/sda5 /media/target
Usage: umount [OPTIONS] dir | device…
eg. umount /media/target
Usage: du [OPTION]… [FILE]…
eg. du
Usage: df [OPTION]… [FILE]…
eg. df
Usage: quota [OPTION]
eg. quota v
Usage: reboot [OPTION]
eg. reboot
Usage: poweroff [OPTION]
eg. poweroff
Usage: kate [options][file(s)]
eg. kate file1.txt file2.txt
Usage: vim [OPTION] [file]…
eg. vi hello.c
Usage: gedit [OPTION] [FILE]…
eg. gedit
Usage: type ‘ctrl+z’ and then ‘bg ‘
Usage: fg [jobid]
Usage: jobs
Usage: sed [OPTION] [inputfile]…
eg. sed ‘s/love/hate/g’ loveletter.txt
eg. awk F: ‘{ print $1 }’ sample_awk.txt
Usage: find [OPTION] [path] [pattern]
eg. find name file1.txt
Usage: locate [OPTION]… FILE…
eg. locate file1.txt
Linux File Permissions
- 3 types of file permissions – read, write, execute
- 10 bit format from ‘ls l’ command
1 2 3 4 5 6 7 8 9 10
file type owner group others
eg. drwxrwr means owner has all three permissions,
group has read and write, others have only read
permission - read permission – 4, write – 2, execute 1
eg. rwxrwr = 764
673 = rwrwxwx
ေမာင္ေပါက္< Knowledge Note >
www.maungpauk.org
Post A Comment:
0 comments:
Please click on advertisement !