๐Ÿ“‚ System/Linux

[Linux] alias ์„ค์ •ํ•˜๊ธฐ

dhyuck 2023. 3. 17. 00:16
๋ฐ˜์‘ํ˜•
  • alias : ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ๋ช…๋ น์–ด๋ฅผ ๋ณ„์นญ์œผ๋กœ ์‚ฌ์šฉํ• ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ

  • alias ์ ์šฉํ•˜๊ธฐ

    • /etc/profile : ์ „์ฒด์‚ฌ์šฉ์ž์˜ ํ™˜๊ฒฝ์„ค์ •
    • /etc/bashrc : ์ „์ฒด ์‚ฌ์šฉ์ž์˜ BASH ํ™˜๊ฒฝ์„ค์ •
    • /etc/zshrc : ์ „์ฒด ์‚ฌ์šฉ์ž์˜ ZSH ํ™˜๊ฒฝ ์„ค์ •
    • ~/.bashrc : ๊ฐœ๋ณ„ ์‚ฌ์šฉ์ž์˜ Bash ํ™˜๊ฒฝ์„ค์ •
    • ~/.zshrc : ๊ฐœ๋ณ„ ์‚ฌ์šฉ์ž์˜ ZSH ํ™˜๊ฒฝ์„ค์ •
  • alias ๋“ฑ๋ก ์˜ˆ์‹œ

      alias ps_java='ps -ef | grep java'
      alias port_LISTEN='netstat -nutplea | grep LISTEN'

๋ฐ˜์‘ํ˜•