How Do You Make an Indefinite Linux Command Go to the Background So That You Have Another Prompt?

Problem scenario
You want a non-terminating (or hanging) Linux command that never finishes to go to the background. You want to use the next command line prompt. The process starts from a command you issue at the command line. How do you do you get to the next prompt?

Solution

  1. This will suspend the process momentarily. Hold control and tap “z.” Ctrl-z
  1. The above command will result in something like this:
    [555]+ Stopped python3 goodprogram.py

Craft a command like this,

How Do You Get WordPress Preview Postings to Show “>> Read more…”?

Problem scenario
You are using WordPress to host your website. Some post previews show a hyperlink “Read more…” but others have no hyperlink. Some post previews (e.g., when you search the website for a pattern) are not updating. Older versions of the post are previewing. How do you get the “Read more…” hyperlink to show in the preview and how do you get the post to be up-to-date?

What Do You Do when Your Internet Speed Is Slow?

Problem scenario
You are at home and your internet is slow. What should you do?

Possible solution #1
Reboot the cable router and any intermediate routers (i.e., any network device such as an IDS or firewall).

Possible solution #2
Log into your router’s interface to view the connected devices. To do this, find the default gateway IP address of your computer.

How Do You Find Words That Match a Pattern and Not the Line with Bash?

Problem
You want to search a file for words that include a given pattern. You want to use grep to return the word that matches a pattern, and you do not want to return the entire line that matches a pattern. You want to return the exact word without the leading space or trailing space. What do you do?

Solution
Try this command:

cat foobar.txt | tr “//” “\n” | grep “coolpattern”

The above,

How Do You Troubleshoot the Adaware Antivirus Problem of “Definitions could not be updated”?

Problem scenario
You are using Adaware Antivirus. You try to download the latest definitions, but you get this error message: “Definitions could not be updated Something prevented the definitions from updating. Please try again at a later time.”

How do you update Adaware Antivirus?

Solution
Try a different internet connection. Some public WiFi spots may block certain ports. VPN tunnels may not help solve the problem.

How Do You Find the Underlying Component in AWS for a Given URL Endpoint?

Problem scenario
You have been given a URL endpoint that is supported by some AWS service or services. How do you find out what the underlying service is?

Solution

  1. Determine the IP address. Ping the hostname. If you have a URL like this, https://acme.com/path/to/file.html, extract the domain name; you can deduce it is acme in the example. Open a command terminal and ping acme.

How Do You Fix a Python Program that Returns “Killed”?

Problem scenario
You are trying to write a Python program. It returns “Killed” on a Linux terminal. How should you fix this?

Possible Solution #1
“Aside from running time, the memory space occupied by a program is a principal cost.” (Taken from The Mythical Man-Month, page 238.)

Refactor your code. There is a programming method called “brute force” which is a reference to creating an exhaustive number of possibilities and processing those possibilities.

How Do You Troubleshoot the Ansible Error “This task includes an option with an undefined variable”?

Problem scenario
You have a playbook, and your variables are defined. But you get an error “FAILED ={‘msg”: ‘The task includes an option with an undefined variable. The error was ‘dict object’ has no attribute ‘Name’…”

What do you do to solve this?

Solution
The variable’s source could be blank. With “ec2_instance_info” the module will connect to AWS.