Dibawah ini adalah code Linux Basic Commands
ane yakin user linux pada pinter bahasa inggrisnya :D
eg. mkdir lhn
eg. ls, ls l, ls lhn
eg. cd lhn
pwd - print name of current working directory
Usage: pwd
eg. vim lhn.txt
eg. cp sample.txt sample_copy.txt
cp sample_copy.txt target_dir
eg. mv source.txt target_dir
mv old.txt new.txt
rm remove files or directories
Usage: rm [OPTION]… FILE…
eg. rm file1.txt , rm rf some_dir
eg. find file1.txt, find name file1.txt
eg. cat file1.txt file2.txt
cat n file1.txt
eg. echo I love India
echo $HOME
eg. grep i apple sample.txt
eg. wc file1.txt
wc L file1.txt
eg. sort file1.txt
sort r file1.txt
eg. tar cvf /home/archive.tar /home/original
tar xvf /home/archive.tar
eg. kill 9 2275
eg. ps, ps el
eg. who , who b , who q
eg. passwd
eg. su remo, su
eg. chown remo myfile.txt
eg. chmod 744 calculate.sh
eg. zip original.zip original
eg. unzip original.zi
executing commands on a remote machine”
Usage: ssh [options] [user]@hostname
eg. ssh X guest@10.105.11.20
Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]
eg. scp file1.txt guest@10.105.11.20:~/Desktop/
eg. mount /dev/sda5 /media/target
eg. umount /media/target
eg. du
eg. df
eg. quota v
eg. reboot
poweroff – power off the system
Usage: poweroff [OPTION]
eg. poweroff
eg. kate file1.txt file2.txt
eg. vi hello.c
gedit A text Editor. Used to create and edit files.
Usage: gedit [OPTION] [FILE]…
eg. gedit
sed stream editor for filtering and transforming text
Usage: sed [OPTION] [inputfile]…
eg. sed ‘s/love/hate/g’ loveletter.txt
awk pattern scanning and processing language
eg. awk F: ‘{ print $1 }’ sample_awk.txt
find search for files in a directory hierarchy
Usage: find [OPTION] [path] [pattern]
eg. find name file1.txt
eg. locate file1.txt
Linux File Permissions
file type owner group others
eg. drwxrwr means owner has all three permissions,
group has read and write, others have only read
permission
673 = rwrwxwx
ane yakin user linux pada pinter bahasa inggrisnya :D
- mkdir – make directories
eg. mkdir lhn
- ls – list directory contents
eg. ls, ls l, ls lhn
- cd – changes directories
eg. cd lhn
pwd - print name of current working directory
Usage: pwd
- vim – Vi Improved, a programmers text editor
eg. vim lhn.txt
- cp – copy files and directories
eg. cp sample.txt sample_copy.txt
cp sample_copy.txt target_dir
- mv – move (rename) files
eg. mv source.txt target_dir
mv old.txt new.txt
rm remove files or directories
Usage: rm [OPTION]… FILE…
eg. rm file1.txt , rm rf some_dir
- find – search for files in a directory hierarchy
eg. find file1.txt, find name file1.txt
- history – prints recently used commands
- cat – concatenate files and print on the standard output
eg. cat file1.txt file2.txt
cat n file1.txt
- echo – display a line of text
eg. echo I love India
echo $HOME
- grep - print lines matching a pattern
eg. grep i apple sample.txt
- wc - print the number of newlines, words, and bytes in files
eg. wc file1.txt
wc L file1.txt
- sort – sort lines of text files
eg. sort file1.txt
sort r file1.txt
- tar – to archive a file
eg. tar cvf /home/archive.tar /home/original
tar xvf /home/archive.tar
- kill – to kill a process(using signal mechanism)
eg. kill 9 2275
- ps – report a snapshot of the current processes
eg. ps, ps el
- who – show who is logged on
eg. who , who b , who q
- passwd – update a user’s authentication tokens(s)
eg. passwd
- su – change user ID or become superuser
eg. su remo, su
- chown – change file owner and group
eg. chown remo myfile.txt
- chmod – change file access permissions
eg. chmod 744 calculate.sh
- zip – package and compress (archive) files
eg. zip original.zip original
- unzip – list, test and extract compressed files in a ZIP archive
eg. unzip original.zi
- ssh – SSH client (remote login program)
executing commands on a remote machine”
Usage: ssh [options] [user]@hostname
eg. ssh X guest@10.105.11.20
- scp – secure copy (remote file copy program)
Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]
eg. scp file1.txt guest@10.105.11.20:~/Desktop/
- fdisk – partition manipulator
- mount – mount a file system
eg. mount /dev/sda5 /media/target
- umount – unmount file systems
eg. umount /media/target
- du – estimate file space usage
eg. du
- df – report filesystem disk space usage
eg. df
- quota – display disk usage and limits
eg. quota v
- reboot – reboot the system
eg. reboot
poweroff – power off the system
Usage: poweroff [OPTION]
eg. poweroff
- kate – KDE Advanced Text Editor
eg. kate file1.txt file2.txt
- vim – Vi Improved, a programmers text editor
eg. vi hello.c
gedit A text Editor. Used to create and edit files.
Usage: gedit [OPTION] [FILE]…
eg. gedit
- bg – make a foreground process to run in background
- fg – to make background process as foreground process
- jobs – displays the names and ids of background jobs
sed stream editor for filtering and transforming text
Usage: sed [OPTION] [inputfile]…
eg. sed ‘s/love/hate/g’ loveletter.txt
awk pattern scanning and processing language
eg. awk F: ‘{ print $1 }’ sample_awk.txt
find search for files in a directory hierarchy
Usage: find [OPTION] [path] [pattern]
eg. find name file1.txt
- locate – find or locate a file
eg. locate file1.txt
Linux File Permissions
- 3 types of file permissions – read, write, execute
- 10 bit format from ‘ls l’ command
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
673 = rwrwxwx

Social Media