Terminal Fedora x21
Terminal Fedora x21
Encryption/
Network Monitor Permissions Generic
Decryption
Compression/
Date/Time Speed Test SELinux Multimedia
Extraction
Fedora WS GPG
HRV Python VeraCrypt
Check
Basics
Back
go to dir
{ cd "name" }
locate a file
{ locate "filename" }
reboot now
{ shutdown -r now }
User
Back
add password
{ passwd "username" }
switch user
{ su "username" }
prefs,whitelist folders
/etc
/var/lib
/boot
/lib
/lib64
/usr/lib
/usr/lib64
/bin
/sbin
/usr/bin
/usr/sbin
/proc
/sys
/dev
/etc/yum.repos.d
/var/tmp/dnf-zxy-w4mxs6lr
/home/zxy/Repozit
Clean
Back
clear cache
{ sudo dnf clean all }
install packages
{ sudo dnf install <package-name> }
search packages
{ sudo dnf search <package-name> }
package updates
{ sudo dnf update }
package upgrades
{ sudo dnf upgrade }
piping the output through grep to search for packages with names
containing "rpmfusion/'name'"
{ sudo dnf list | grep rpmfusion }
flatpak help
{ flatpak --help }
max_parallel_downloads=20
defaultyes=True
enable access to both the free and the nonfree rpm repository
openh264 library
{ sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1 }
tainted free-repos
{ sudo dnf install rpmfusion-free-release-tainted }
tainted nonfree-repos
{ sudo dnf install rpmfusion-nonfree-release-tainted }
flatpak repo
{ flatpak remote-add --if-not-exists flathub
https://dl.flathub.org/repo/flathub.flatpakrepo }
Network
Back
# color of username@hostname
{ ifconfig enp0s25 up }
Monitor
Back
install wireshark
{ sudo dnf install wireshark }
installing aircrack
{ sudo dnf install aircrack-ng }
tools
{ sudo wavemon } { sudo nmon }
Permissions
Back
navigate terminal to win folder right click - open in terminal list all
permissions for folders and files in current dir
{ ls -l }
permissions syntax rwxrwxrwx - rwx(user-u)rwx(group-g)rwx(other-o)
change all permissions to rwx
{ chmod ugo+rwx filename(ext)/foldername }
open file
{ ./filename }
Encryption
Back
kernel version
{ uname -r }
Extract/Compress
Back
compress file(s)
{ tar czvf sampl.tar.gz samplet.txt (filename {/path} ) filename
filename... }
synchronizing the system clock with a remote server using ntp, enable
{ sudo timedatectl set-ntp true }
Speed Test
Back
install python
{ sudo dnf install python } { sudo dnf install python3 }
check release
{ lsb_release -a }
{ cd Spte }
download speedtest_cli.py
{ wget -O speedtest-cli
https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedte
st.py }
grant execution
{ chmod +x speedtest-cli }
go to dir
{ cd /home/zxy/Spte }
check in bytes
{ ./speedtest-cli --bytes }
share in bytes
{ ./speedtest-cli --share --bytes }
server lists
{ wget http://www.speedtest.net/speedtest-servers.php }
view a server ID
{ more speedtest-servers.php }
SELinux
Back
check status
{ sestatus } { getenforce }
permissive mode
{ sudo setenforce 0 }
enforcing mode
{ sudo setenforce 1 }
Multimedia
Back
initial variant
{ sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base}
gstreamer1-plugin-openh264 gstreamer1-libav gstreamer1-plugins-
ugly }
vdpau
{ sudo dnf install libvdpau libva-vdpau-driver libvdpau-va-gl }
mesa
{ sudo dnf install mesa-va-drivers mesa-vdpau-drivers.x86_64 mesa-
dri-drivers mesa-filesystem mesa-libEGL mesa-libGL mesa-libGLU
mesa-libOSMesa mesa-libOpenCL mesa-libTeflon mesa-omx-drivers
mesa-va-drivers mesa-vdpau-drivers mesa-libglapi mesa-libgbm }
xorg
{ sudo dnf install xorg-x11-drv-ati xorg-x11-drv-evdev xorg-x11-drv-
fbdev xorg-x11-drv-intel xorg-x11-drv-libinput xorg-x11-drv-nvidia-libs
xorg-x11-drv-openchrome xorg-x11-drv-qxl xorg-x11-drv-vesa xorg-
x11-drv-vmware xorg-x11-drv-wacom xorg-x11-drv-synaptics-legacy
xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-drivers xorg-
x11-drv-amdgpu xorg-x11-drv-wacom-serial-support xorg-x11-font-
utils xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-misc xorg-x11-
server-Xwayland xorg-x11-server-source xorg-x11-server-x2gokdrive
xorg-x11-xauth xorg-x11-xbitmaps xorg-x11-xdm xorg-x11-xinit xorg-
x11-xinit-session }
gstreamer
{ sudo dnf install gstreamer1-vaapi gstreamer1-plugin-libav
gstreamer1-plugin-gif PackageKit-gstreamer-plugin gstreamer-plugin-
crystalhd gstreamer1 gstreamer1-rtsp-server gstreamer1-svt-vp9
gstreamer1-svt-av1 gstreamermm perl-GStreamer1 phonon-qt5-
backend-gstreamer pipewire-gstreamer python3-gstreamer1
rubygem-gstreamer mingw32-gstreamer1 gnome-video-effects
pocketsphinx-plugin }
intel
{ sudo dnf install intel-compute-runtime intel-gmmlib intel-gpu-
firmware intel-igc intel-igc-libs intel-lpmd intel-mediasdk intel-opencl
intel-vpl-gpu-rt libva-intel-hybrid-driver intel-media-driver libva-intel-
media-driver oneVPL-intel-gpu libigfxcmrt libvpl libvpl-tools nvtop }
codecs
{ sudo dnf install libavcodec-free libavcodec-freeworld pipewire-
codec-aptx xpra-codecs-freeworld xmms2-avcodec opencv-imgcodecs
python3-numcodecs alsa-plugins-a52 alsa-plugins-lavrate baresip-vp9
daala-libs daala-tools flac-libs libtheora libvorbis libvpx mingw64-
wavpack mozilla-openh264 openh264 openjpeg-libs schroedinger vlc-
plugin-gstreamer vlc-plugins-freeworld xvidcore }
drm
{ sudo dnf install libdrm libdrm-armada drm-utils igt-gpu-tools }
{ sudo dnf install libplacebo }
appstream metadata
{ sudo dnf update @core }
ffmpeg
{ sudo dnf install ffmpeg }
reboot & check for snap’s path in the env var PATH
{ echo $PATH }
check for /var/lib/snapd/snap/bin
install mpv-wayland
{ sudo snap install “package-name” }
Eject Devices
Back
unmount a device
{ sudo umount /dev/sdb1 } (partition of mounted sdb disk)
Color Profile
Back
Efibootmgr
Back
Example Configuration
[root@localhost ~]# efibootmgr
BootCurrent: 0004
BootNext: 0003
BootOrder: 0004,0000,0001,0002,0003
Timeout: 30 seconds
Boot0000* Diskette Drive(device:0)
Boot0001* CD-ROM Drive(device:FF)
Boot0002* Hard Drive(Device:80)/HD(Part1,Sig00112233)
Boot0003* PXE Boot: MAC(00D0B7C15D91)
Boot0004* Linux
Multipart Archive
Back
.7z
{ sudo dnf install p7zip p7zip-plugins p7zip-gui }
extract a multipart image extension archive with a .7z
{ 7z x endname.png }
HRV Python
Back
Sequential
Greys, Purples, Blues, Greens, Oranges, Reds,YlOrBr, YlOrRd, OrRd, PuRd, RdPu,
BuPu, GnBu, PuBu, YlGnBu, PuBuGn, BuGn, YlGn
Sequential 2
binary, gist_yarg, gist_gray, gray, bone, pink, spring, summer, autumn, winter,
cool, Wistia, hot, afmhot, gist_heat, copper,
Diverging
PiYG, PRGn, BrBG, PuOr, RdGy, RdBu, RdYlBu, RdYlGn, Spectral, coolwarm, bwr,
seismic
Cyclic
Qualitative
Pastel1, Pastel2, Paired, Accent,Dark2, Set1, Set2, Set3, tab10, tab20, tab20b,
tab20c
Miscellaneous
{
import numpy as np
from matplotlib import style
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
style.use('ggplot')
Output:
- Poincare plot with SD1, SD2 lines and ellipse showing variability
"""
ax1 = RRints[:-1]
ax2 = RRints[1:]
# Ellipse parameters
center_x = np.mean(ax1)
center_y = np.mean(ax2)
angle = np.degrees(np.arctan2(SD1, SD2)) # Angle of rotation of ellipse
# Add grid
plt.grid(True)
# Show plot
plt.show()
def ellipseFittingMethod(RRints):
"""
Input:
- RRints: List of RR intervals
Output:
- Dictionary with SD1 and SD2 values
"""
SDSD = np.std(np.diff(RRints))
SDRR = np.std(RRints)
SD1 = (1 / np.sqrt(2)) * SDSD
SD2 = np.sqrt((2 * SDRR ** 2) - (0.5 * SDSD ** 2))
return {'SD1': SD1, 'SD2': SD2}
# Swap RR intervals
RR_intervals =
[763,776,772,757,748,746,748,739,743,779,792,786,802,810,806,793,780,768,775,
787,790,735,694,678,713,707,707,723,698,672,673,698,693,646,640,640,647,646,7
43,755,711,677,671,696,706,693,694,692,714,716,697,704,701,711,709,692,669,65
4,653,665,660,648,648,648,644,632,621,620,625,614,620,615,622,643,660,648,655
,655,701,700,684,645,628,631,621,649,896,775,742,722,707,680,670,681,698,663,
655,649,646,639,649,675,680,662,659,668,682,684,683,667,652,685,748,801,780,8
24,822,803,747,738,743,737,733,727,765,772,738,750,787,796,784,747,738,742,72
6,712,714,718,731,725,753,790,784,746,760,750,737,724,719,705,699,688,677,661
,697,739,809,817,832,827,800,759,752,748,743,728,722,769,802,802,813,848,832,
814,812,805,771,734,723,717,701,707,733,843,865,873,848,818,785,718,729,690,6
75,663,665,716,704,719,709,702,677,677,692,707,798,731,694,678,670,676,675,67
5,670,683,760,825,843,859,868,831,793,760,740,713,688,676,659,659,668,680,699
,726,738,730,721,705,697,699,704,690,694,676,675,653,643,636,629,620,611,605,
609,611,615,620,620,639,655,677,686,711,737,945,867,857,857,843,837,827,779,7
63,751,734,725,688,658,643,634,646,648,646,642,659,658,667,669,661,682,726,72
4,754,746]
# Plot the Poincare plot with SD1 and SD2 lines and ellipse
plotPoincareWithEllipse(RR_intervals, ellipse_results['SD1'], ellipse_results['SD2'])
}
creates the poincare scatter plot using r-r interval data plotting color
coded acceleration and deceleration points printing the C_DOWN and
C_UP parameters for heart rate acceleration and deceleration
respectively.
Acceleration happens when RRn+1 < RRn and deceleration when RRn+1 > Rrn.
The three heart beats that represent a point on the plot has RRn in milliseconds
preceding RRn+1, the two successive intervals that are plotted forward in time.
The greater or lesser value in milliseconds that the successive RRn+1, taken into
account while plotting makes for the decelerating or accelerating heart beat.
Each point whether accelerating or decelerating represents linear time. A group
of points or all points on the plot in general represents non-linear time since
variations in successive points tend to fluctuate more than less. When isolated
clusters are analyzed as groups they tend to revert back to represent linear time
due to linear representation of values on the respective axes.
{ sudo nano poincarehra.py }
}
import numpy as np
from matplotlib import style
import matplotlib.pyplot as plt
style.use('ggplot')
def hraMethod(RRints):
"""
Perform analysis to quantify heart rate asymmetry (HRA).
Input :
Output :
def plot_poincare(RRints):
"""
Plot the Poincaré plot with points color-coded for acceleration and
deceleration.
Input :
# Plotting
plt.scatter(ax1[indices_up], ax2[indices_up], color='#df0647',
label='Acceleration', alpha=0.8)
plt.scatter(ax1[indices_down], ax2[indices_down], color='#1e9634',
label='Deceleration', alpha=0.8)
plt.show()
# Swap RR Intervals
RRints =
[763,776,772,757,748,746,748,739,743,779,792,786,802,810,806,793,780,768,775,
787,790,735,694,678,713,707,707,723,698,672,673,698,693,646,640,640,647,646,7
43,755,711,677,671,696,706,693,694,692,714,716,697,704,701,711,709,692,669,65
4,653,665,660,648,648,648,644,632,621,620,625,614,620,615,622,643,660,648,655
,655,701,700,684,645,628,631,621,649,896,775,742,722,707,680,670,681,698,663,
655,649,646,639,649,675,680,662,659,668,682,684,683,667,652,685,748,801,780,8
24,822,803,747,738,743,737,733,727,765,772,738,750,787,796,784,747,738,742,72
6,712,714,718,731,725,753,790,784,746,760,750,737,724,719,705,699,688,677,661
,697,739,809,817,832,827,800,759,752,748,743,728,722,769,802,802,813,848,832,
814,812,805,771,734,723,717,701,707,733,843,865,873,848,818,785,718,729,690,6
75,663,665,716,704,719,709,702,677,677,692,707,798,731,694,678,670,676,675,67
5,670,683,760,825,843,859,868,831,793,760,740,713,688,676,659,659,668]
}
import numpy as np
from matplotlib import style
import matplotlib.pyplot as plt
from scipy.stats import gaussian_kde
style.use('ggplot')
Input:
- RRints: [list] of RR intervals
Output:
- r_rr: [numpy.float64] interbeat autocorrelation coefficient
"""
ax1 = RRints[:-1]
ax2 = RRints[1:]
mu_rr = np.mean(RRints)
r_rr = np.mean((ax1 - mu_rr) * (ax2 - mu_rr)) / (np.sqrt(np.mean((ax1 - mu_rr) **
2) * np.mean((ax2 - mu_rr) ** 2)))
return mu_rr, r_rr
# Swap RR intervals
RRints =
[763,776,772,757,748,746,748,739,743,779,792,786,802,810,806,793,780,768,775,
787,790,735,694,678,713,707,707,723,698,672,673,698,693,646,640,640,647,646,7
43,755,711,677,671,696,706,693,694,692,714,716,697,704,701,711,709,692,669,65
4,653,665,660,648,648,648,644,632,621,620,625,614,620,615,622,643,660,648,655
,655,701,700,684,645,628,631,621,649,896,775,742,722,707,680,670,681,698,663,
655,649,646,639,649,675,680,662,659,668,682,684,683,667,652,685,748,801,780,8
24,822,803,747,738,743,737,733,727,765,772,738,750,787,796,784,747,738,742,72
6,712,714,718,731,725,753,790,784,746,760,750,737,724,719,705,699,688,677,661
,697,739,809,817,832,827,800,759,752,748,743,728,722,769,802,802,813,848,832,
814,812,805,771,734,723,717,701,707,733,843,865,873,848,818,785,718,729,690,6
75,663,665,716,704,719,709,702,677,677,692,707,798,731,694,678,670,676,675,67
5,670,683,760,825,843,859,868,831,793,760,740,713,688,676,659,659,668,680,699
,726,738,730,721,705,697,699,704,690,694,676,675,653,643,636,629,620,611,605,
609,611,615,620,620,639,655,677,686,711,737,945,867,857,857,843,837,827,779,7
63,751,734,725,688,658,643,634,646,648,646,642,659,658,667,669,661,682,726,72
4,754,746,771,795,765,771,751,725,707,678,663,655,643,641,644,654,654,662,680
,688,726,738,754,694,676,669,652,633,691,715,691,677,679,689,714,698,692,687,
682,645,642,639,656,665,797,800,810,783,762,756,727,686,676,665,679,681,676,6
65,667,655,643,621,620,614,604,602,595,593,592,601,609,618,622,629,678,714,70
0,737,729,735,690,709,698,676,657,638,615,605,595,595,607,625,634,615,612,607
,611,613,616,647,725,701,680,684,824,865,882,832,766,729,692,675,640,655,642,
646,654,663,668,684,698,690,685,676,676,672,669,681,690,683,681,685,699,693,6
87,693,690,682,680,672,670,665,668,658,648,644,634,631]
Download the checksum file into the same directory as the image you
downloaded and navigate to it.
{ curl -O https://fedoraproject.org/fedora.gpg }
{ sha256sum -c Fedora-Workstation-41-1.4-x86_64-CHECKSUM }
Veracrypt
Back