Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

LINUX Write a command that will start and run the gedit command in the backgroun

ID: 670622 • Letter: L

Question

LINUX

Write a command that will start and run the gedit command in the background. What is the difference between kill 1010 and kill -15 1010? Discuss the differences in setting nice values by a root user as compared to a regular user. To what do the following positional parameters refer? Write a shell script to do the following: display the following menu Menu Say hello Say goodbye Then ask the user to make a choice. Using a case statement, print "Hello" if 1 is selected, print "Goodbye" if 2 is selected, and print "Bad choice" if any other character is selected. What are the differences between the su and the sudo commands? What would you expect to find in the exports configuration file? Which command can be used to list all USB hubs along with the devices that are connected to USB ports?

Explanation / Answer

26.

Graphical editor that highlights code and syntax errors based on the language you are writing in or specify. Can be very useful for debugging code.

SYNTAX

gedit [--help] [--debug[-section]] [--new-window] [--new-document] [--quit] [filename(s)...]  

To open a specific file:

To open multiple files:

DESCRIPTION

gedit is a text editor for the GNOME Desktop.

27.

Definitely kill the job with PID 1010.

28.

nice becomes useful when several processes are demanding more resources than the CPU can provide. In this state, a higher-priority process will get a larger chunk of the CPU time than a lower-priority process. Only the superuser (root) may set the niceness to a smaller (higher priority) value. On Linux it is possible to change /etc/security/limits.conf to allow other users or groups to set low nice values.[1]

If a user wanted to compress a large file, but not slow down other processes, they might run the following:

The related renice program can be used to change the priority of a process that is already running.

The exact mathematical effect of setting a particular niceness value for a process depends on the details of how thescheduler is designed on that implementation of Unix. A particular operating system's scheduler will also have various heuristics built into itIf you want to change the priority of any process there are two things which you need to consider. There are two terms which will be used in this article i.e. NICE and PRIORITY.

In case you haven't notice when you run top command you get two different values for any process as I have marked in different color below
PID USER PR  NI  VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2899 root 20   0  2704 1128 868 R 0.3 0.1 0:02.26 top
1 root 20   0  2892 1420 1200 S 0.0 0.1 0:01.29 initHere PR denoted PRIORITY and NI denotes NICE value where the PRIORITY range varies from 0 to 39 for any process in Linux and NICE value varies from -20 to 19.

`nice' prints or modifies a process's "niceness", a parameter that affects whether the process is scheduled favorably.

Syntax
# nice [OPTION] [COMMAND [ARG]...]
Example:
The below command will give a nice value of -20 to 2342 PID
# nice --20 2342

29.

Bash Positional Parameter – $0, $1, $2 ..

Positional parameters are the arguments given to your scripts when it is invoked. It could be from $1 to $N. When N consists of more than a single digit, it must be enclosed in a braces like ${N}.

The variable $0 is the basename of the program as it was called.

First, create the arithmetic.sh shell script as shown below.

30.

31.The su command switches to the super user – or root user – when you execute it with no additional options. You’ll have to enter the root account’s password. This isn’t all the su command does, though – you can use it to switch to any user account.

Sudo runs a single command with root privileges. When you execute sudo command, the system prompts you for your current user account’s password before running command as the root user.

su - change user ID or become superuser

The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5). If a command is specified, it is passed to the shell for execution. Otherwise, an interactive shell is executed.

sudo -i disappear description in manual

32.these options define filament-specific properties, such as diameter, temperatures and cooling.

33.find /dev/bus/

kill 1010 Kill the job with PID 1010 there is a small chance, though, that it doesn't get killed. kill -15 1010

Definitely kill the job with PID 1010.