Ch.3 Working with the linux shell Flashcards

1
Q

command to check current locale settings

A

localectl

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

command to set an environment variable

A
  • export variable_name=value
  • <variable_name>=<value>;export
    </value></variable_name>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

command to set system clock to a specific timezone

A

timedatectl set-timezone “timezone”

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

command used for reporting information from and managing the system clock

A

date

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

date %

A

%D or %m/%d/%y

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

Full date %

A

%F or %Y-%m-%d

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

Full weekday name %

A

%A

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

Locale category for telephone number format

A

LC_TELEPHONE

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

locale category for address format

A

LC_ADDRESS

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

Locale category for how characters are compared and sorted

A

LC_COLLATE

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

Nanosecond %

A

%N

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

What can cause attempting to set the time with timedatectl command to not work?

A

If the environment is using NTP

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

What clocks does a linux OS use?

A

Hardware clock or real-time clock (RTC)
and
System clock

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

What defines settings that remain persistent even after logging off or rebooting?

A

Configuration files

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

When looking at a variables properties, what does -x indicate?

A

signifies that it is an environment variable

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

Which variable is visable to child processes?

A

environment variable

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

Which variable only exists in memory spaces of the shell it was created in?

A

shell variable

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

command format to print specifics about time and date

A

date +%

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

command that displays a list of all environment variables in the current shell

A

env

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

command that displays a list of shell variables and functions in the current process

A

set

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

command that displays a variables properties

A

declare -p <variable>;</variable>

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

command to delete a variable and remove it form the environment

A

unset

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

command to convert existing shell variables to environment variables

A

export <variable_name>;</variable_name>

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

command to list available timezones to set the system clock to

A

timedatectl list-timezones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
command to list locality
localectl list-locals
26
command to manage the (RTC) real-time clock
hwclock
27
command to set date and time
date -s
28
command to set system clock to hardware clock
hwclock -w hwclock --systohc
29
command to set system time
timedatectl set-time 'HH:MM:SS'
30
command to set system time using the RTC
hwclock -s or hwclock --hctosys
31
command to verify changes within /etc/local.conf
localectl status
32
command to view directory permissions instead of file permissions
ls -ld
33
command used to view and manage system clocks
timedatectl
34
command used to view and modify system locale and keyboard settings
localectl
35
command used to define output formats used by applications depending on the location of the linux computer
locale
36
date representation %
%x
37
day of the month %
%d
38
day of the year %
%j
39
locale category for local code
LC_IDENTIFICATION
40
locale category for measure format
LC_MEASUREMENT
41
locale category for money format
LC_MONETARY
42
locale category for paper sizes
LC_PAPER
43
term to describe a parent process creating a child process
spawn
44
what file do localectl changes go to?
/etc/locale.conf
45
configuration changes are not active until?
They are stored in memory or sourced
46
Files ending in .csh are sourced when using?
C-shell
47
files ending in .sh are sourced when using which shells?
bourne, korn, or bash
48
list of bash config files
/etc/profile /etc/bashrc /home//.bash_profile /home//.bashrc /home//.bash_logout
49
scripts in the directory /etc/profile.d are read or sourced when?
during the login process
50
The shell parameter noclobber does not allow
> (stdout) to overwrite an existing file
51
to place changes in memory, the user must
execute the commands in the configuration file
52
used to configure bash shell features
/etc/bashrc /home//.bashrc
53
what are the stdout operators and what do they do?
> redirect stdout to a file (writes over file) >> redirect stdout to a file (appends the file)
54
what command executes the commands in a configuration file?
source .
55
what does ~ represent?
the home directory
56
What operator is here string and what does it allow the user to do?
<<< Allows a user to send a string to a command
57
What settings will you find in file /home//.bash_profile?
default editor settings ex. EDITOR=/usr/bin/nano Path - search path of directories where executable programs can be found
58
When a user logs into a system, customization scripts are read in the following order when using bash shell
1. /etc/profile 2. /home//.bash_profile 3. /home//.bashrc 4. /etc/bashrc
59
When is /etc/bashrc read? What settings can you find?
read when a pseudo-terminal starts Shell - command shell for this session. ex. /bin/bash PS1 - the command prompt config
60
When is the /etc/profile read and what environment variables might you see?
once at login. Hostname of computer or node Mail - file where a user receiving mail resides
61
operator to combine stdout and stderr
2>&1 or &>
62
system-wide bash configuration files
/etc/profile /etc/bashrc
63
used to perform operations during logout
/home//.bash_logout
64
what defines settings that remain persistent even after logging off or booting?
configuration files
65
What is the operators for stderr?
2> chooses an alternate stderr file 2>> creates a new stderr file if it does not exist or appends the file