WLSS Flashcards
Debian Network Settings (persistent and non-persistent)
Via ip
commands
ip link
ip addr
-
ip route
Persistent via
-
ifupdown
- /etc/network/interfaces
systemd-networkd
- NetworkManager (GUI)
RHEL Network Settings (persistent and non-persistent)
Via ip
commands
ip link
ip addr
ip route
Persistent via
nmtui
nmcli
- /etc/sysconfig/network-scripts/ifcfg-<device></device>
Applying the network config changes on Debian and RHEL
Debian:
- /etc/network/interfaces:
ifdown <device>
andifup <device>
- systemd-networkd:
networkctl reload
RHEL:
nmcli connection up <device>
what will this do?> find . -name h*
find files and directories starting with letter h starting from current working directory
What is *,?,[abcd],[a-d],[^ab] or [!ab]
Filename Expansion:*
= 0 (inclusive!!) or more characters?
= exactly 1 character[abcd]
= exact 1 character, but only those that are listed[a-d]
= exact 1 character, but only those within the given range (here: a until d)[^ab]
= exact 1 character, EXCEPT these letters
What is {a,b,c}
,{0..6}
and {0..6..2}
Brace expansion:{a,b,c}
: Generate each of the listed characters (here: a, b, c){0..6}
: Generate each of the characters with the given range (here: 0,1,2,3,4,5,6){0..6..2}
: Generate each of the characters with the given range, with an increment (here: 0,2,4,6)
⇒ No need to match existing filenames.
what is $()
notation of command substitution~$ du /etc > log-$(date +%Y-%m-%d)
~$ ls
log-2017-09-29
what is the notation of command substitution and what is the use
$( ) => Use output of commands
What is $(( ))
Arithmetic expansion:~$ a=5
~$ b=4
~$ echo De som is $((a+b))
De som is 9
What is arithmetic expansion notation and what does it do?
$(( ))
=> does calculations
What do these do?command 2>&1 >/dev/null
command 2>&1 >/dev/null
:
Redirect output to trash and write errors to standard output
Thus: only keep the errors and be able to do something with it via e.g. pipes
What are the different shells?
-
**bash****
- Based on original Bourne shell, sh and implements useful features from ksh and csh
-
**tcsh****
- Syntax resembles more C language, derivative of original csh (Berkely Unix C Shell)
-
**dash:** Debian Almquist shell
- Aims to be as small as possible, default non-interactive shell in Ubuntu/Debian
-
**zsh:** Z shell
- Extended Bourne shell, Default shell in macOS Catalina and Kali 2020.4
- Others:
- **ksh:**** Korn shell
- **fish:** friendly interactive shell
where are all shells listed?
/etc/shells
how to change user login shell?
chsh
or usermod --shell <shell> <user>
where is login shell for each user stored?
/etc/passwd