Notes & Comments Flashcards
FDL
The GNU Free Documentation License is a copyleft license for free documentation, designed by the Free Software Foundation (FSF) for the GNU Project
~/.bashrc
Bash configuration specific to the user
gzip myfile.tar
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.
DISPLAY
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.
HCL
Hardware Compatibility List
Option to limit number of results for searching commands
-l
What type of multitasking does Linux use?
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.
True or false?
Linux users normally download and install applications from the applications’ websites.
False, normally Linux users install applications using the application manager direct from their distro’s repositories.
Square brackets ([]
) and curly braces ({}
)
Square brackets ([]
) and curly braces ({}
) have distinct purposes in the context of shell scripting and the command line:
-
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 likefile1.txt
,file2.txt
, etc.).
- Conditional expressions in shell scripting (e.g.,
-
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
-
Used in:
-
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`
).
- Brace expansion to generate sequences or combinations of strings (e.g.,
-
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
-
Used in:
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.
To concatenate means
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.
Examples of Linux GUIs
KDE, XFCE, Unity
What is the term for a package that is a prerequisite required for installation of another program?
A dependency occurs when one package depends on another.
Naming variables syntax
- Must start with a letter
- Underscores are used instead of embedded spaces
- Punctuation marks are not allowed
To see all the variables that are in the user’s environment, use the _______ command.
printenv
.bash_history
.bash_history:
• This file typically contains a history of commands that you’ve executed in the Bash shell.