Skip to content

Latest commit

 

History

History
111 lines (85 loc) · 3.73 KB

File metadata and controls

111 lines (85 loc) · 3.73 KB

System Control

 

1. Check Internet Speed

user@machine:~$ speedtest-cli    # Install: pip install speedtest-cli

 

2. How to reduce terminal text? / Customizing BASH Prompt Text

user@machine:~$ PS1='[\u@\h \W]\$ '                       # Small
user@machine:~$ PS1='[@ \W]\$ '                           # Extra Small

 

3. Find the MAC Address

user@machine:~$ ifconfig | grep 'HWaddr' 

# Go to router icon --> Connection Information --> General

 

4. Fixed the Compiz Configure Issue

user@machine:~$ dconf reset -f /org/compiz
user@machine:~$ setsid unity  # (If doesn't work: sudo apt install unity.)
user@machine:~$ unity --reset-icons

 

5. TTY Mode:

We can use shortcut key: control → alter → F7 # Try F2, F3, ..., F6 (i.e., F2 through F6).

This shoud bring up a text-based login prompt (F2 through F6). Afterward, log in with your username (whoami) and password. Keep in mind, F1 is reserved for GUI.

We could use terminal or console, if we access via GUI mode.
user@machine:~$ sudo chvt 7                            # Try 1, 2, 3, ... 7

 

6. Create a New User and Remove the Root Privilege

user@machine:~$ sudo adduser anyName           ### Add a New User
user@machine:~$ sudo usermod -aG sudo anyName  ### Add the Root Privilege
user@machine:~$ sudo gpasswd -d anyName sudo   ### Remove the Root Privilege
  • References:

    1. Create a SUDO User (web)
    2. Remove the Root Privilege-1 (web)
    3. Remove the Root Privilege-2 (web)
    4. Create User and Remove the Root Privilege (web)
    5. Restore the Root Privilege (web)

 

8. Program Killing Procedure:

  • Step 1: Show the all running program

    user@machine:~$ top                     # dynamic
    user@machine:~$ ps aux                  # static
    user@machine:~$ ps aux | grep '<PID>'   # Find a particular process with details
  • Step 2: Kill program(s)

    user@machine:~$ kill 3288             # Kill a particular program
    # Example: Here, 3288 is the process identity (PID), Then the program (3288) will halt.
    
    user@machine:~$ kill -9 3288          # Kill a particular program forcefully. It is especially helpful for the GPU system.
    user@machine:~$ kill -9 -1            # Kill all the program

 

9. Boot a Pendrive for the Linux-based OS:

  • Step 1: Findout the Pendrive

    user@machine:~$ ls /dev/sd    # Press the Tab (NOT the Enter)
    No Pendrive Pendrive Exist
  • Step 2: Boot the Pendrive

    user@machine:~$ sudo dd if=anyName.iso of=/dev/sdx bs=4M status=progress && sync   # x = {b, c, d, ...}

 

10. Wi-Fi Reboot for Linux

nmcli radio wifi off
echo 'Wi-Fi is turned off. Internet will appear within 15 seconds if everything goes smoothly.'
sleep 10 # Pause for 10 seconds
nmcli radio wifi on
echo 'Wi-Fi will turn on after a few seconds.'

11. Battery Timing

https://askubuntu.com/questions/69556/how-do-i-check-the-batterys-status-via-the-terminal