a000058556
    • 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
    # Linux 第三堂04/16 ## 現代的Linux 1.2014之後的版本 2.是用systemd開機 user id=1000 (稱為login帳號) 0 (稱為管理員帳號) 1~999 (系統帳號) ## Ubunta的root預設是disable(不可開啟,會有資安漏洞) ## Linux沒有副檔名的概念 --------------- ## Linux開機標準動作: sudo -i (切換root權限) apt update (更新倉庫清單) apt list --upgrade (查看更新清單) apt upgrade (更新軟體) reboot (重開機) sudo -i (切換root權限) uname -r (確認版本資訊) apt autoremove (自動清除無用元件) reboot (重開機) ### 更新時套件數量確認 確認版本套件數量 dpkg -l | wc -l 版本套件資訊存出 dpkg -l > bdse138.txt 確認保留的核心套件(正常要有3套,最新+2套近期的) less -N boot/grub/grub.cfg ### 更新過程的設置檔案覆蓋 1.更新時出現覆蓋提示 ![](https://i.imgur.com/7R0EDDa.jpg) Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation 2.確認兩個檔案的不同 ![](https://i.imgur.com/y7SLpwR.jpg) ---我的 +++新的 -刪除 +新增 3.若只有部分設定被重置,且有新增其他設定,建議選(Y)讓新的覆蓋,再去把被還原的設定改回來。 ![](https://i.imgur.com/RKKI1Wk.jpg) ## 關機標準指令 shutdown -h (預設60秒後關機) shutdown -h+2 (預設2分鐘後關機) shutdown -h 14:00 (下午2點關機) poweroff = shutdown -h now 中斷shutdown(對會馬上關機的指令無效) -c ------------------- ## Linux桌面版本改名稱 nmtui 選第三項(Set system hostname)改名 nano /etc/hosts 改目錄名稱 ------------------- ## HS指令存放位置 ### 1.系統開機使用: /bin (一般指令,相當於man(1)) /sbin (系統指令S:system相當於man(8)) *為系統套件,是用apt install安裝,屬於系統套件 綠色=捷徑,水藍=指令 ### 2.系統正常運作: /usr/bin /usr/sbin *為系統套件,是用apt install安裝,屬於系統套件 ### 3.第三方自行編譯的程式(Third-party)(free) /usr/local/bin /usr/local/sbin *透過compile產生,例如:make,cmake,pip3 ### 4.已經編譯好的程式(third-party)(free) /usr/local/軟體名稱/bin /usr/local/軟體名稱/sbin *例如:hadoop,spark。 ### 5.廠商軟體Vender(可能要付費) /opt/Vender名稱/軟體名稱 *使用vendor安裝方式,例如:/opt/hpsw/nnmi ------------------- ## Option目的:改變指令處理的方式 ls (列出目錄名稱) ls -l (列出目錄名稱與詳細資訊) ## arguments(參數):改變指令處理的對象 ls (列出目錄名稱) ls /usr (列出usr目錄的內容) ## 一個ent一個指令 可用;來連接2個指令在一個ent執行 ------------------ ## Linux壓縮檔類型: 1. gzip 相容性最好,但壓縮比不高 2. bzip2 壓縮比有好一點 3. xz 壓縮比最好,但相容性不一定好 ## Linux解壓縮: -t list -v 顯示詳細操作過程(Verbose mode) -f 檔名 -x extract解開 ----------------------------------------------------- ## 啟動程式若有套件版本不對的訊息時 1.要確認不對的版本套件(jupyter為例) ![](https://i.imgur.com/YxSxhp0.jpg) 2.確認套件需求 less -N /usr/lib/python3/dist-packages/requests/__init__.py ![](https://i.imgur.com/VgbnAtE.jpg) ![](https://i.imgur.com/7gaubmI.jpg) 3.若套件比套件需求新,就更新套件需求檔。 # 錯誤回報 若筆記內有發現錯誤隨時可以登入後在這邊留言~

    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