Complete Basic Linux Commands
Daftar Isi Artikel
Linux adalah sistem operasi yang sangat dekat dengan penggunaan terminal, karena kebanyakan orang benar-benar menggunakan Linux untuk sistem administrasi, sistem operasi Linux banyak digunakan sebagai server, dan kemungkinan situs web Kamu di-host di Linux. server yang menggunakan Linux.
Oleh karena itu, jika Kamu adalah pengguna pemula Linux, maka Kamu harus memahami konsep dasar dari perintah yang ada di Linux, pada awalnya mungkin agak sulit, tetapi setelah terbiasa dengan itu, Kamu selalu dapat bermain dengan perintah di linux.
Berikut ini adalah perintah dasar linux | Basic Linux Commands :
FILES & NAVIGATING
Is —> directory listing (list an files/folders on current dir)
Is -l —> formatted listing
ls -la —> formatted lncludlng hidden files
cd dir —> change directory to dir (dir will be directory name)
cd .. —> change to parent directory
cd../dir —> change to dir parent directory
cd —> change home directory
pwd —> show current directory
mkdir dir —> create a directory dir
rm file —> delete file
rm -f dir —> force remove file
rm -r dir —> delete directory dir
rm -rf dir —> remove directory dir
rm -rf/ —> launch some neuclear bombs targeting your system
cp file1 file2 —> copy file1 file2
mv file1 file2 —> rename file1 file2
touch file —> create or update file
cat file —> output content of file
cat>> file —> append standard Input into the file
tail -f file —> output contents of file as it grows
NETWORKING
ping host —> ping host
whois domain —> get whois for domain
dig domain —> get DNS for domain
dig -x host —> reserve lookup host
wget file —> download file
wget -c file —> continue stopped download
wget-r url —> recuively download files from url
curl url —> outputs the webpage from url
curl -o meh.html url —> writes the page to meh.html
ssh user@host —> connect to host as user
ssh -p port user@host —> connect using port
ssh -D user@host —> connect & use bind port
PROCESSES
ps —> display currently active prosesses
ps aux —> detailed outputs
klll pid —> kill process with process id (pid)
killall proc —> kill on processes named proc
SYSTEM INFO
date —> show current date/time
uptime —> show uptime
whoami —> who you‘re logged in as
w —> display who is online
cat/proc/cpuinfo —> display cpu info
cat/proc/meminfo —> memory info
free —> show memory and swap usage
du —> show directory space usage
du -sh —> display readable sizes in GB
df —> show disk usage
uname -a —> show karnel config
COMPRESSING
tar cf file.tar files —> tar files into files tar
tar xf file.tar —> untar into current directory
tar tf file.tar —> show contents of archive
OPTIONS
c —> create archive
t —> table of contents
x —> extract
z —> use zip/gzip
f —> spesify filename
j —> bzip2 compression
w —> ask for comfirmation
k —> do not overwrite
T —> files from file
v —> verbose
PERMISSIONS
chmod octal file —> change permissions of file
4 —> read (r)
2 —> write
1 —> execute (x)
order owner/group/world
chmod 777 —> rwx for everyone
chmod 755 —> rw for owner, rx for group world
SOME OTHERS
grep pattern files —> search in files for pattern
grap-r pattern dir —> search for pattern rocursively in dir
locate file —> find all instances of file
whereis app —> show possible location of app
man command —> Show manual page for command