pwdcd [dizin]cd veya cd ~cd -Örnek:
$ pwd
/home/user/documents
$ cd ..
$ pwd
/home/user
$ cd -
/home/user/documents
lsls -als -lls -lhÖrnek:
$ ls -lh
total 20K
drwxr-xr-x 2 user user 4.0K Jul 19 10:00 Desktop
drwxr-xr-x 2 user user 4.0K Jul 19 10:00 Documents
drwxr-xr-x 2 user user 4.0K Jul 19 10:00 Downloads
touch [dosya_adı]mkdir [dizin_adı]mkdir -p [yol/a%C4%9Fac%C4%B1k/dizin_ad%C4%B1]Örnek:
$ touch newfile.txt
$ mkdir newdir
$ mkdir -p deeply/nested/directory
cp [kaynak] [hedef]cp -R [kaynak] [hedef]mv [kaynak] [hedef]rm [dosya_adı]rmdir [dizin_adı]rm -r [dizin_adı]Örnek:
$ cp file1.txt file2.txt
$ mv file2.txt newname.txt
$ rm newname.txt
$ rm -r olddir
chmod [izinler] [dosya_adı]chown [kullanıcı]:[grup] [dosya_adı]Örnek:
$ chmod 644 myfile.txt
$ chown user:group myfile.txt
cat [dosya_adı]less [dosya_adı]head [dosya_adı]tail [dosya_adı]Örnek:
$ cat myfile.txt
This is the content of myfile.txt
$ tail -n 5 logfile.log
grep [desen] [dosya_adı]grep -r [desen] [dizin]grep -c [desen] [dosya_adı]Örnek:
$ grep "error" logfile.log
$ grep -r "TODO" ./src
nano [dosya_adı]vim [dosya_adı]Örnek:
$ nano config.txt
$ vim script.sh
ps auxpspstreeÖrnek:
$ ps aux | grep nginx
$ pstree -p
kill [PID]pkill [süreç_adı]kill -9 [PID]Örnek:
$ kill 1234
$ pkill firefox
[komut] &jobsfg [iş_numarası]bg [iş_numarası]Örnek:
$ long_running_command &
[1] 1234
$ jobs
[1]+ Running long_running_command &
$ fg 1
Ctrl + CCtrl + ZCtrl + LCtrl + RCtrl + ACtrl + ECtrl + WCtrl + Ualias [isim]='[komut]'aliasÖrnek:
$ alias ll='ls -lh'
$ alias
ll='ls -lh'
function_name() {
# Fonksiyon gövdesi
}
Örnek:
$ greet() {
> echo "Hello, $1!"
> }
$ greet Alice
Hello, Alice!
history!!![n]!stringÖrnek:
$ history
1 ls
2 cd documents
3 cat file.txt
$ !2
cd documents
?*[karakterler][a-z]Örnek:
$ ls file?
file1.txt file2.txt
$ ls file*
file1.txt file2.txt file3.txt
[komut] > [dosya_adı][komut] >> [dosya_adı][komut] 2> [dosya_adı][komut1] | [komut2]Örnek:
$ ls > filelist.txt
$ grep "search_term" filelist.txt
$ ls | grep "search_term"
variable_name=valueecho $variable_nameÖrnek:
$ MYVAR="Hello"
$ echo $MYVAR
Hello
export VARIABLE_NAME=valueunset VARIABLE_NAMEÖrnek:
$ export PATH=$PATH:/usr/local/bin
$ unset MYVAR
nano ~/.zshrcsource ~/.zshrcÖrnek:
$ nano ~/.zshrc
$ source ~/.zshrc
plugins=(git z autojump)Örnek:
$ git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
$ nano ~/.zshrc
$ source ~/.zshrc
2024 © Tüm hakları saklıdır - buraxta.com