Hu Josh
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- type: title: 明新科大2022年ansible-1 # 簡報的名稱 tags: presentation # 簡報的標籤 slideOptions: # 簡報相關的設定 theme: sky # 顏色主題 transition: 'fade' # 換頁動畫 # parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg' --- ## 課程一:Terminal #### 2022年下學期,明新科技大學資管系 #### 講師:胡嘉璽 ---- ## 課程重點 * 作業系統中的重要元件 * 什麼是UI,GUI * 什麼是Terminal * 什麼是shell,CLI * 你為什麼要學CLI Shell * 常見的Terminal ---- ## 課程重點 * <font color="#00f">**作業系統中的重要元件**</font> * 什麼是UI,GUI * 什麼是Terminal * 什麼是shell,CLI * 你為什麼要學CLI Shell * 常見的Terminal ---- ## 作業系統中重要的元件 ---- ### 常見的作業系統 ![](https://i.imgur.com/1gJnZ6d.jpg) ---- ![](https://i.imgur.com/GhdFSHJ.png) ---- ![](https://i.imgur.com/2zWnFje.png) ---- ![](https://i.imgur.com/BuGGiwN.jpg) ---- ![](https://i.imgur.com/5x9vk8Z.png) ---- ### 你熟悉的作業系統 ![](https://i.imgur.com/3VbPDNZ.png) ---- ### 大部分的電腦是沒有UI的 ![](https://i.imgur.com/o6NnrnR.jpg) ---- ### 作業系統的組成 ![](https://i.imgur.com/n5UlS1c.png) ---- ### 作業系統中的元件說明 * 電腦的目的只是讓機器工作 * 人類和電腦溝通沒有必要性 * 大部分電腦都能「自洽」,不需要和人溝通 * 包括交通工具、衛星、家電、零組件、微電腦 * 在製造時已燒錄「控制」硬體的軟體 ---- ## 課程重點 * 作業系統中的重要元件 * <font color="#00f">**什麼是UI,GUI**</font> * 什麼是Terminal * 什麼是shell,CLI * 你為什麼要學CLI Shell * 常見的Terminal ---- ## 什麼是UI、GUI ---- ### 什麼是UI * 即使用者介面(User Interface) * 必須有人類感官與之產生輸出、輸入與運作內容三方互動 * 雙向的資訊傳遞成為可能 * 輸入:允許使用者操作執行一套系統 * 輸出:允許系統向使用者傳達操作效果 * 感官式:和人類感官直接互動,如眼手互動,如GUI * 邏輯式:需了解機器提供的邏輯,如語言式,DOS指令 ---- ### 什麼是UI ![](https://i.imgur.com/KfoICoW.png) ---- ### 早期的UI ![](https://i.imgur.com/11jtsgN.png) ---- ### 早期的UI ![](https://i.imgur.com/vnnbP1r.jpg) ---- ### 不一樣的UI ![](https://i.imgur.com/oQjQ47d.png) ---- ### 這些都是UI ![](https://i.imgur.com/PwCLfMP.png) ![](https://i.imgur.com/7XGMC1h.png) ![](https://i.imgur.com/rhWjvf6.png) ---- ## 什麼是GUI ---- ### 什麼是GUI * 即圖形使用者介面(Grapic User Interface) * 主要利用視窗對作業系統進行操作 * 1968年Douglas Carl Engelbart發明,使用滑鼠 * 1973年PARC正式推出 * 是目前所有電腦、手機GUI的始祖,之後50年也無太大變化 * 只需眼手協調,不需要了解OS的運作原理 * 包括Windows、MAC、Linux、iOS、Android ---- ### 標準的視窗型使用者介面(NeXTSTEP) ![](https://i.imgur.com/bPghDB7.png) ---- ### 擁有各種元件的UI ![](https://i.imgur.com/0Q0BF1P.png) ---- ## 課程重點 * 作業系統中的重要元件 * 什麼是UI,GUI * <font color="#00f">**什麼是Terminal**</font> * 什麼是shell,CLI * 你為什麼要學CLI Shell * 常見的Terminal ---- ## 什麼是Terminal ---- ### 什麼是Terminal * 就是終端機,用於連線回主機操作的設備 * 本身只要有UI即可,不需有任何資源 * 早期大型系統時,多人可同時用終端機連回主機 * 提供多人多工使用 * 主機同時可有多人多用途 * 必須有UI,不見得有GUI * 可透過鍵盤滑鼠、USB、網路、序列/串列埠連回主機 * 操作主機本身也是Terminal的一種,只是是透過鍵盤/螢幕連接而已 * 一般我們從本機操作的Terminal稱之為Terminal Emulator,就是在本機上模擬一個終端機 ---- ### Terminal架構圖 ![](https://i.imgur.com/aSAmY5I.png) ---- ### GUI的Terminal ![](https://i.imgur.com/WDXQNvR.jpg) ---- ### 使用PC作為Terminal連入主機 ![](https://i.imgur.com/y9FflvE.png) ---- ## 課程重點 * 作業系統中的重要元件 * 什麼是UI,GUI * 什麼是Terminal * <font color="#00f">**什麼是shell,CLI**</font> * 你為什麼要學CLI Shell * 常見的Terminal ---- ## 什麼是Shell、CLI ---- ### 什麼是Shell ![](https://i.imgur.com/JHZjNHP.png) ---- ### 什麼是Shell * 作業系統包括了許多核心功能 * 將這些核心功能提供給「其外」的應用,如人類,機器、軟體 * 由於他是整個OS的最外層,因此命名為Shell(殼) * 代表核心裏面被Shell堅固地保護著 * UI是由Shell所提供的,GUI當然也是Shell提供 * 例如在Windows下,shell提供了文字介面的command prompt、PowerShell以及圖形介面的explorer.exe ---- ### 什麼是CLI * 全程為Command Line Interface,是UI的一種 * 用「邏輯式」的方法提供UI給使用者 * 由各式各樣的command(指令)所組成 * 使用者必須了解指令的使用文法,稱之為語法(Syntax) * 相對於GUI,也稱之為CUI * 必須對作業系統的運作有較深入的了解 * 一般的OS都會提供一個文字介面的shell給終端機使用 ---- ### CLI的特點 * 比GUI難學,上手困難並不易操作 * 不同CLI的指令語法不見得一致,不同系統要學習不同的CLI,如Linux下的sh和Windows下的PowerShell就完全不同 * 不適用於多媒體及互動式操作 * 功能超級強大,速度比GUI快5-100倍 * 提供指令串接功能,可以把不同指令串接使用 * 大部分的OS都提供,不受硬體資源限制 * <font color='#F00'>**可以自動化所有電腦操作**</font> ---- ## 課程重點 * 作業系統中的重要元件 * 什麼是UI,GUI * 什麼是Terminal * 什麼是shell,CLI * <font color="#00f">**你為什麼要學CLI Shell**</font> * 常見的Terminal ---- ## 你為什麼要學CLI Shell ---- ### 你為什麼要學CLI Shell * 省時、簡單、快速、強大、優雅、省功、掌控、安全、自動、穩定、直接 * 主機/伺服器管理中,95%的工作無法用GUI完成 * 大到建立雲端主機,小到執行一個單一程式 * 既然已經學程式語言,多學相對簡單的「程式」 * DevOps的興起,你必須什麼都會 * <font color="#f00">**自動化所有的事情**</font> ---- ### 重新開機 * Windows:在桌面上按 <kbd>alt</kbd>-<kbd>F4</kbd>,用上下箭頭選擇「重新啟動」再按<kbd>Enter</kbd> * 使用CLI:輸入`sudo reboot`然後<kbd>Enter</kbd> ---- ### 開啟一個1000萬行的文字檔 * Windows:應該是沒辦法......:frowning: * 一般CLI:`vi <文字檔名>` ---- ### 照降冪排序一個1000萬行的文字檔 * Windows:用notepad++中應該有辦法:confused: * 一般CLI:`sort -r < <文字檔名> > > <輸出檔名>` ---- ### 將一個1000萬行的文字檔去除重複行 * Windows:用notepad++中應該有辦法:confused: * 一般CLI:`sort <文字檔名> | uniq > <輸出檔名>` ---- ## 常見的Terminal ---- ### 常見的Terminal * Linux的termnial:Terminal * MacOS的terminal:iTerm, iTerm2、PowerShell * Windows 10/11的terminal:Windows終端機 ---- ### Ubuntu Linux Terminal ![](https://i.imgur.com/9WPGuMm.png) ---- ### MacOS iTerm2 ![](https://i.imgur.com/9m87qbN.png) ---- ### Windows 終端機(強烈推薦好用!) ![](https://i.imgur.com/pVG7ZYt.png) ---- ### 終端機和Shell別弄混 * 終端機是一個UI,用來連上主機 * 可能是GUI、可能是CLI,也可能是VR,就是用來連上主機 * 連線方式都可以網路、USB、螢幕鍵盤、無線電、光波..... * 自己連到自己也可以用終端機 ---- ### 終端機和Shell別弄混 * Shell是作業系統的一個功能:heavy_check_mark: * 可以從本機用UI或GUI透過Shell使用OS功能:heavy_check_mark: * 也可以從終端機連上主機,再從Shell使用主機功能:heavy_check_mark: * 「遠端連上主機的終端機」這句話是錯誤的描述。:X:

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully