[Araştırma] Linux kullanıcılarının .(shell)rc dosyaları nasıl?

Benimki bu şekilde:
Bash:
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
    for rc in ~/.bashrc.d/*; do
        if [ -f "$rc" ]; then
            . "$rc"
        fi
    done
fi
unset rc

# Kendi özelleştirmelerim:
echo -e "Merhaba \033[1m$USER!\033[0m"
PS1="\033[1;94m[\u@\H \W]\$\033[0m "
alias py="python3"
alias metin="vi"
alias merhaba="echo 'Merhaba $USER!'"
alias dosyalar="nautilus ."
alias linux-surumu="uname -r"
alias technopat="firefox https://technopat.net/sosyal/bolum/gnu-linux.13"
# Bu 'espeak-ng' paketini gerektirir!
alias soyle="espeak-ng -v TR"
alias guncelle="pkexec dnf update"
alias kur="pkexec dnf install"
alias kaldır="pkexec dnf remove"
alias temizle="clear"
alias sudo="doas"

command_not_found_handle () {
  echo -e "\033[1mHoopbala:\033[0m Böyle bir komut yok ya da tanımlı değil."
  return 127
}
Eki Görüntüle 959650
Hoopbala :D?
 
[CODE lang="bash" title=".bashrc"]#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '[/CODE]
Hiç havalı değil :(
 
[CODE lang="bash" title=".bashrc"]#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '[/CODE]
Hiç havalı değil :(
Ben de bir Gentoo meselesini halledeyim, birlikte öğreniriz hocam bash özelleştirmeyi. :D
 
Benim şu anda bu şekilde.
Bash:
# Kreato's .bashrc
export LANG=en_US.UTF-8
export EDITOR=nvim
alias nano="nvim"
alias cls="clear"
alias poweroff="doas poweroff"
alias shutdown="doas poweroff"
alias reboot="doas reboot"
alias stmake="rm -rf config.h patches.h && doas make clean install && killall st"
alias genupdate="doas emerge --ask --verbose --update --deep --changed-use @world"
alias dwmake="rm -rf config.h patches.h && doas make clean install && killall dwm"
alias clr="clear"
alias sl="ls"
# /sound:sys:alsa
alias xconnect="xfreerdp /v:192.168.122.121:3389 /sound:sys:pulse /mic:sys:pulse /w:1920 /h:1080 /bpp:32 +clipboard +fonts /gdi:hw /rfx /rfx-mode:video +menu-anims +window-drag"
alias eworld="doas emerge -avuDN world"
alias power='upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage"'
eval "$(starship init bash)"

if [ -d "$HOME/.cargo/bin" ] ; then
  export PATH="$PATH:$HOME/.cargo/bin"
fi

# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
        # Shell is non-interactive.  Be done now!
        return
fi
 
Ben küçük bir kısmını değiştirdim, sadece o kısmı atacağım.
[CODE lang="bash" title=".zshrc"]export EDITOR='vim'
# Command Aliases
alias gc='git clone'
alias sudo='doas'
alias ls='ls -F -h --color=always -v --author --time-style=long-iso'
alias ll='ls -l'
alias l='ls -l -a'
alias sl='ls'
alias v='vim'
alias update='doas apt update'
alias upgrade='doas apt upgrade'
alias jar='java -jar'[/CODE]
 
Ben küçük bir kısmını değiştirdim, sadece o kısmı atacağım.
[CODE lang="bash" title=".zshrc"]export EDITOR='vim'
# Command Aliases.
alias gc='git clone'.
alias sudo='doas'
alias ls='ls -F -h --color=always -v --author --time-style=long-iso'
alias ll='ls -l'
alias l='ls -l -a'
alias sl='ls'
alias v='vim'
alias update='doas apt update'.
alias upgrade='doas apt upgrade'.
alias jar='java -jar'[/CODE]

alias sudo='doas' yerine ln -s /usr/bin/doas /usr/bin/sudo yapabilirsiniz, böylelikle sudoyu kullanan bazı scriptler de çalışır.
 
alias sudo='doas' yerine ln -s /usr/bin/doas /usr/bin/sudo yapabilirsiniz, böylelikle sudoyu kullanan bazı scriptler de çalışır.
Teşekkürler, ayrıca bir şey soracaktım. Ben doas.conf'da permit persist yaptığım hâlde her seferinde şifre soruyor, bunu nasıl düzeltebilirim?
doas.conf şu şekilde:
permit persist ensar as root
 

Geri
Yukarı