Notes & Comments Flashcards

1
Q

FDL

A

The GNU Free Documentation License is a copyleft license for free documentation, designed by the Free Software Foundation (FSF) for the GNU Project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

~/.bashrc

A

Bash configuration specific to the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

gzip myfile.tar

A

The command gzip myfile.tar compresses the file myfile.tar using the gzip compression algorithm. After running this command, a new file named myfile.tar.gz will be created in the same directory, and it will be the compressed version of the original myfile.tar file. The .gz extension indicates that the file has been compressed using gzip.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DISPLAY

A

The DISPLAY environment variable in Unix-like operating systems typically contains information about the display server where graphical applications can be shown. It specifies the communication endpoint for the X Window System, which manages the display of graphical user interfaces on Unix-based systems.

For example, a common value for DISPLAY might be “:0.0,” indicating the local display server. If you’re running applications remotely, it would point to the server’s IP address or hostname, followed by a display number.

Understanding the DISPLAY variable is crucial for X11-based applications to know where to render their graphical interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

HCL

A

Hardware Compatibility List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Option to limit number of results for searching commands

A

-l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What type of multitasking does Linux use?

A

Preemptive multitasking is a task in which a computer operating system uses some criteria to decide how long to allocate to any one task before giving another task a turn to use the operating system. The act of taking control of the operating system from one task and giving it to another task is called preempting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or false?
Linux users normally download and install applications from the applications’ websites.

A

False, normally Linux users install applications using the application manager direct from their distro’s repositories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Square brackets ([]) and curly braces ({})

A

Square brackets ([]) and curly braces ({}) have distinct purposes in the context of shell scripting and the command line:

  1. Square Brackets []:
    • Used in:
      • Conditional expressions in shell scripting (e.g., [ "$var" -eq 5 ]).
      • Filename expansion (e.g., ls file[0-9].txt matches files like file1.txt, file2.txt, etc.).
    • Purpose:
      • [ ] is primarily used for evaluating conditional expressions in shell scripting.
      • It’s also used for pattern matching or wildcard expansion when used within square brackets.
    • Example:
      bash
      if [ "$var" -eq 5 ]; then
        echo "Variable is equal to 5."
      fi
  2. Curly Braces {}:
    • Used in:
      • Brace expansion to generate sequences or combinations of strings (e.g., echo {apple,orange}).
      • Command substitution (e.g., $(command) or `command`).
    • Purpose:
      • {} is used for creating sequences, combinations, or lists of strings in brace expansion.
      • It’s also used for grouping commands in command substitution.
    • Example:
      bash
      echo prefix_{one,two}_suffix

      This expands to: prefix_one_suffix prefix_two_suffix

In summary, square brackets [ ] are primarily associated with conditional expressions and pattern matching, while curly braces {} are used for brace expansion and command substitution. They serve different roles in shell scripting and provide distinct functionalities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

To concatenate means

A

To concatenate means to combine or link things together in a series or sequence. In the context of programming or scripting, concatenation often refers to combining strings or values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Examples of Linux GUIs

A

KDE, XFCE, Unity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the term for a package that is a prerequisite required for installation of another program?

A

A dependency occurs when one package depends on another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Naming variables syntax

A
  • Must start with a letter
  • Underscores are used instead of embedded spaces
  • Punctuation marks are not allowed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

To see all the variables that are in the user’s environment, use the _______ command.

A

printenv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

.bash_history

A

.bash_history:
• This file typically contains a history of commands that you’ve executed in the Bash shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

.bash_logout

A

.bash_logout:
• This file is executed by Bash when you log out of a session. It can contain commands or scripts to run during the logout process.

17
Q

.bashrc:

A

.bashrc:
• This file is a script that is executed whenever a new interactive Bash shell is started. It can contain various configurations, aliases, and settings for your Bash environment.

18
Q

.profile

A

.profile:
• This file is often used for setting environment variables and running commands at login. It is read by login shells.

19
Q

ps auxf | grep <pid # from $$> | head -1

A

The command ps auxf | grep <pid # from $$> | head -1 is used to find and display information about the process with a specific PID (process ID). Here’s the breakdown:

•	ps auxf: Lists information about all processes in a tree-like format.
•	grep <pid>: Searches for lines containing the specified PID obtained from \$\$.
•	head -1: Displays only the first line of the output (assuming there is a match).

Assuming you are using the PID from $$ (the current shell’s PID), the command might look like this:

ps auxf | grep $$ | head -1

In this case, the command is looking for the process information of the currently running shell. The grep $$ part filters the lines that contain the PID of the current shell, and head -1 ensures that only the first matching line is displayed.