October 11, 2022

Linuxda alias yaratish

alias lar linux foydalanuvchisining hayotini osonlashtiradi, tasavvur qiling sudo apt update && sudo apt upgrade ning o'rniga faqatgina up deb

yozish kifoya

Terminalga kiramiz(Ctrl+Alt+T) va sudo nano .bashrc deb teramiz

.bashrc faylining ichi..

masalan docker ga kirish uchun faqatgina d deb yozsam kiradi, buning uchun .bashrc faylining ichiga alias d='sudo docker' deb yozsam kifoya

.bashrc faylini o'zgartirgandan so'ng source ~/.bashrc qilish esdan chiqmasin, aks xolda o'zgarish boshqa terminallarga ta'sir qilmaydi...

sudo nano .bashrc

.bashrc fayl ichiga:

alias d='sudo docker

source ~/.bashrc