能运行shell吗_terminal, shell, bash, zsh
Terminal:
shell運行在里面。A terminal refers to a wrapper program that runs a shell.
Shell:
The shell is the program that actually processes commands and returns outputs.
Most shells also manage foreground and background processes, command history, and command-line editing. These features are standard in bash, the most common shell in modern Linux systems.
shell 是一個命令行解釋器,是人機交互的端口。
用戶輸入一條命令,shell 就立即解釋執(zhí)行一條(interactive)。
- 編譯器: 輸入A語言的源代碼,輸出是B語言;如C++,被編譯成匯編語言;
- 解釋器:輸入A語言的源代碼,直接執(zhí)行A語言;可以理解為“編譯器+機器,編譯器把輸入語言編譯成中間語言,然后機器執(zhí)行。
Command: 在黑框框里輸入的命令--> command-line interface (CLI);
GUI: 在屏幕上戳戳-->graphical user interface (GUI)
shell類型
常見的 shell 解釋器有 sh、bash這兩種,其他有 ksh、csh 和 zsh。
一門語言有解釋器,就可以作為 shell 使用。比如Java 有第三方解釋器 Jshell,PHP有 PHP Shell。windows有 windows shell( command interpreter)
Bash
Bash 是最常見的 shell。
喚醒 bash shell 時方式不同,加載不同文件:
login shell 加載 ~/.bash_profile
non-login shell 加載 ~/.bashrc 。
zsh
zsh兼容 bash,還有自動補全等功能
zsh 的配置文件~/.zshrc
配置 shell
shell 在啟動時都會去找配置文件,然后運行它。
你安裝的一些腳本,如果想讓它能夠全局運行,就需要在配置文件中設置路徑。
有過設置路徑后還是不管用的經歷嗎?多半是因為把配置寫在了錯誤的配置文件里。* 應該在配置shell(最常見的是配置默認命令)之前,使用 echo $SHELL,確認自己現(xiàn)在用的是什么shell后,再去編輯對應的配置文件 *
Console:
能輸入命令的界面. 比如Chrome中的console可以輸入JavaScript;
Shell也是種console但只能輸入Linux command
Python & IPython:
Python is a high-level general-purpose programming language.
IPython is an interactive shell that is built with python.
IDE:
An integrated development environment(IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI)
- Python IDE: Pycharm, Jupyter, Spider
PyCharm is an IDE developed by JetBrain, the team responsible for one of the most famous Java IDE.
Anaconda is a package manager.
總結
以上是生活随笔為你收集整理的能运行shell吗_terminal, shell, bash, zsh的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软考初级程序员报考指南分享
- 下一篇: html及css经典面试题