DasGeek
    • 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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: Troubleshooting Linux tags: Templates, Talk description: View the slide with "Slide Mode". --- # Troubleshooting In Linux! --- This document was created by the North GA LUG Group. --- ### Lock-Ups If your system or an app locks up it can be a frustrating experience. Here are some tips and tricks to get you back on your feet. - System Lock: If your entire system is locked hit Ctrl + Alt + F2 to get to a command line. This will let you do some further analysis on your system such as htop to see if a process is hung. - `xkill`: the `xkill` command turns your mouse cursor into a weapon. Once you type `xkill` in the terminal you will see your mouse change to an x. Anything you click it will kill that process. - `pkill`: the `pkill` command is similar to the `xkill` command except that you can terminate all instances of an application. ie `sudo pkill -9 -f steam` - Kill terminal or commands that are hung using `ctrl+c` or `ctrl+z` - To get a terminal window without leaving your desktop GUI - Use`ctrl+alt+t` or `ctrl+shift+t` --- ### Process Monitoring - `top` & `htop`: `top` and `htop` will both provide you a list of running processes. `htop` is little more graphical and provides shortcut keys to kill processes by hitting F9. - To list all files open on the system use `lsof` - You can use `watch` to keep an eye on processes as they are running. Example `watch lsusb` to monitor if USB devices are plugged in. --- ### General Tips - Check permissions if you're having trouble executing an app or a file. `$ ls -la` is an easy way to see permissions. - You can find kernel version using `$ uname -a` which can be helpful for troubleshooting and filling out bug reports - `inxi` is an insanely valuable tool for collecting system information. There are many cli switches to get you the information you need. ie `sudo inxi -b` for short form basic info. `sudo inxi -M` for the machine info (such as motherboard, serial, manufacturer, model, etc). Highly suggest circling out all of the options by running `man inxi`. A useful full system dump (think about opening an issue) can be done with `sudo inxi -b -v 8` - `ncdu` is a super helpful command to figure out where all of your speak space had been consumed. - Purge old kernels! otherwise your `/boot` will fill up. ie `sudo apt autoremove -y`. - Find path to software installed using `which` as an example `which chromium` will tell you the program is located in /usr/bin/chromium --- ### Checking Hardware - List all PCI devices on your system with `lspci -v` this is great for getting model of PCI devices such as Ethernet Controller, Wifi, GPU, etc. - List all USB devices `lsusb` great tool for determining if usb devices are detected and what usb devices are connected. - Check what hard drives are detected `fdisk -l` - To check hard drive space use `df-h` --- ### Black Screen w/ blinking cursor **Especially Nvidia users** - Hit 'e' at the GRUB screen to edit the settings - add 'nomodeset' before 'quiet splash' in the entry - What does this do? Instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded. ### Can't Boot - Rescatux is a great tool to have around to help repair common issues with Grub. - Rescatux is a Debian based live cd that lets you fix your GRUB1 and GRUB2 installations (as per Super Grub2 Disk lacks) but does much more including: - Check and fix filesystems - Blank Windows passwords - Change Gnu/Linux password - Regenerate sudoers file ### Checking Logs - Most systems are using Systemd so you can get your logs with the following commands: > $ less /var/log/messages (System logs) > $`dmesg | less` (Kernel logs) $ `journalctl -b` (-b switch shows all messages since last reboot) $ `journalctl -b -p err` (shows messages marked as an error) - For situations where you're getting a console login vs. desktop GUI > $ grep EE /var/log/Xorg.0.log - List logs in order of when they were written `$ ls -lrt /var/log` - Look for errors only in dmesg using `dmesg | grep 'error' ` *Note some distros utilize a different general log. Some Debian based distros uses /var/log/syslog vs. /var/log/messages as it's main log. If you don't have messages just change the end of the command to syslog in place of any of the commands above or below. #### Searching Keywords In Logs - You can search keywords in the logs by using 'grep' - Navigate to /var/log `$ sudo grep "error" messages` - This will return all messages that contain the word error in the logs #### Monitoring Logs - Use ‘tail’ to monitor logs real-time for bug reporting or system analysis. This will provide you updates that occur and could be invaluable for bug reports or monitoring of user activity or changes on your system. > As an example: For openSUSE, Rhel you can use: > sudo tail -f -n 6 /var/log/messages For Debian based distros > sudo tail -f -n 6 /var/log/syslog The ‘f’ switch tells it to follow The ‘n’ switch tells it to display last N’th number of lines ### Network Troubleshooting - `ip addr` Shows addresses assigned to all network interfaces - `ip route` Show table routes. - `ip link` - `ping` the ping command is useful to test connectivity between two sources - `ifup` using this in combination with your specific interface ex: eth0 *(which could be obtained using `ip addr`)* will bring the interface up. - `ifdown` - `ifup` using this in combination with your specific interface ex: eth0 *(which could be obtained using `ip addr`)* will bring the interface down. - `traceroute` is a network tool to tell you the hops in-between destinations. ex: `traceroute google.com` - `host` or `host -t` this command lets you find IP or IP to name along with DNS info. ex: `host www.google.com` - Another command you can use is `nslookup` and example would be `nslookup google.com` which will provide you DNS info. - `iwconfig` configure wireless network from terminal. ### Backup Solutions - Having a solid backup in place can help you to overcome issues easily and without losing your valuable data. - DejaDup is a simple to use back-up tool - Clonezilla will let you make entire clones of your existing drives and restore them if things go awry. - Mega.nz is a nice tool for syncing and storing files on the cloud. ### Manual - All the above can be researched further using `man` command. An example `man ifconfig` will provide information and options for that command.

    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