************************************************************************ Ref. C:\Users\QI\warehouse\X_copy\config\TLCL-13.07.pdf (1 of many ref) Notes about Fedora Mazdak Allayari 07/04/2020 A return to my 1st passion, in the dawn of computing era : the freedom community that are Linux and OpenSource ************************************************************************ $sudo dmidecode -t system | grep "Serial Number" $sudo dmidecode -t system | grep "Product Number" $sudo dmidecode -t bios | grep Revision $sudo dmidecode -t memomy | grep Sizes $ps aux $top $glances $free $df -aTh $msg $logrotate $journalctl -o verbose $usermod -a -G adm username $rsyslog $gnome-system-log $grubby --default-kernel $cat /etc/sysconfig/kernel $grub2-set-default 2 sudo cat /boot/efi/EFI/fedora/grub.cfg $ls -l /boot/ $lsmod # {list the loaded kernelmodules} $modinfo {a drive_name} $modprobe {a module_name} # To load $modprobe -r {a module_name} # To unload $mokutil --sb-state #To confirm if Secure Boot is enabled $keyctl list %:.system_keyring #information about the keys on the system key rings $rpm -q {rpm_name} $rpm -Fvh package.rpm #update rpm $rpm -e package.rpm #uninstall rpm $rpmkeys -K package.rpm #verify that a package has not been corrupted or tampered #DNF performs automatic checking of GPG signatures during sudo rpm --verify --all sudo rm -rf /var/cache/dnf/* #To verify your entire system and see what files are missing, issue the following command as root: rpm -Va $history $bc # command line calculator $! 16 # run th command of 16th line of history $id $su - # Access to root acount $gunzip $gzip $tar # for archiving $rsync [options source destination] $rm #remove files $rmdir #remove files and directory $ scp test.txt servername:~/ #in home directory with shortcut tilda $ scp test.txt servername:/tmp/ admin@192.168.1.1's password: $nautilus # Graphical interface $dolphin # Graphical interface (will be installed) $thunar # Graphical interface (will be installed) Disk info and manage ---------------------- $sudo fdisk -l $sudo cfdisk # partition editor $pydf $partx $findmnt -l $df -h $du $lspci $lsusb $lspmcia $lscpu ---------------------------------------------------------- <<< USB to RS232 >>> adapter cable connects from the USB port of a computer to a device. Such serial to USB adapter connects to devices for configuration or programming under Linux. ## use grep command/egrep command to filter out USB devices ## $ dmesg | grep -i serial $ dmesg | grep -i FTDI ---------------------------------------------------------- Install and configure a TFTP server (Fedora 22 and later) ----------------------------------------------------------- #dnf install -y tftp-server firewall-config #systemctl enable tftp.service #systemctl start tftp.service ______________________________________________ LAN command ---------------------------------------------- Change hostname $sudo -s $hostnamectl set-hostname [new-name] $ip addr show $ping rpsrv06 $ifconfig $cat /etc/resolv.conf $less /var/lib/dhcp/dhclient.leases $more /var/lib/dhcp/dhclient.leases $cat /var/lib/dhcp/dhclient.leases $cat /etc/resolv.conf #show DNS LAN $dig sfr.fr # Show DNS of a site $netstat # $Netstar # Active Internet Connections $arp # Manage the kernel's IPv4 network neighbour cache. $dnf grouplist -v #List available desktop environnements $dnf history userinstalled #Manually installed $rpm -qa #All package installed $systemctl #list of loaded units $systemctl -t service -a #brief version $systemctl list-unit-files # with detail Task scheduling ------------------------------------------------------- minute hour #dayofmonth month #dayofweek user command 1 2 3 4 5 6 7 By default crontab use bash. For graphical : $VISUAL gedit crontab -e $ps -ef | grep cron | grep -v grep # Check that cron running $/sbin/service cron start # Start the service Enable Minimize/Maximize Buttons in Gnome ------------------------------------------------ By default its isn't available. You must install the following package $ sudo dnf install gnome-tweak-tool Then, go to tweak tool in Window Titlebars section and active these options. To Access from Fedora to Windows ---------------------------------------------- $rdesktop -u mazdak@resoprint.fr rpsrv13.resoprint.fr $xfreerdp /u:mazdak /w:1920(or 1366) /h:1080(or 768) /v:172.16.60.10 /smart-sizing # xfreerdp must bet installed before To Access from Windows to Fedora ---------------------------------------------- In Windows side Putty must be installed In Fedora side openssh package must be installed, then run his service $systemctl start sshd.service Now, from Windows/Putty connect to ssh is possible In Fedora side run "rsh" for install the client rsh Attention The main difference between Rlogin (rsh) and SSH is their security features. Rlogin was created at a time when security wasn’t really a major problem, thus it does not use encryption and all the traffic is sent in plain text From shell, to run a batch file: ------------------------- $bash ./ or $chmod 755 # Allow Read, Write, and Execute permission $./ See the PATH ------------------- $echo $PATH ____________________________________________________________________________________________ ID Old generation NET-TOOLS New generation IPROUTE2 SCRIPTION --------------------------------------------------------------------------------------------------------------- 1 ifconfig -a ip link show 01 - See all network interfaces 2 ifconfig eth1 up ip link set up eth1 02 - Activate the network interface 3 ifconfig eth1 down ip link set down eth1 03 - Disable the network interface 4 ifconfig eth1 192.168.0.1/24 ip addr add 192.168.0.1/24 dev eth1 04 - Défine IP/réseau mask 5 ifconfig eth1 0 ip addr del 192.168.0.1/24 dev eth1 05 - Delete IP/réseau mask 6 ifconfig eth1 ip addr show dev eth1 06 - Interface Specific Information 7 ifconfig eth1 hw ether 00:52:bc:33:25:a1 ip link set dev eth1 address 00:52:bc:33:25:a1 07 - Modification of MAC-ADDRESS 8 route -n  ou netstat -rn ip route show 08 - Display the routing table 9 route add -net 192.168.0.1 ip route add default via 192.168.0.1 09 - Adding the default route 10 route add -net 192.168.0.1/24 gw eth1 ip route add 192.168.0.1/24 dev eth1 10 - Add a static route 11 mii-tool ethtool 11 - Network handling and request 12 iwconfig iw 12 - Displaying WLAN information ________________________________________________________________________________________________________________________ $Cat > xxx.txt # open un text file. the end is Ctrl+C $ head /etc/passwd #show 101st line of passwd $whitch gcc #Write the full path of gcc ************************************************************* These two lines, create a playground directory, containing 100 subdirectories each containing 26 empty files ------------------------------------------------------------ $ mkdir -p playground/dir-{001..100} $ touch playground/dir-{001..100}/file-{A..Z} ************************************************************* When you type cl, install of cl package is proposed ---------------------------------------------------- ---------------------------------------------------- $ftp ftp.gnu.org #Accept install of package Name : anonymous $get diction-1.11.tar.gz bye $tar xzf diction-1.11.tar.gz $cd diction-1.11 $./configure $make $rm getopt.o $make $ls -l diction getopt.c $touch getopt.c $ls -l diction getopt.c $make $sudo make install $which diction $man diction Write a executable script ---------------------------------------------- -Create a file : HelloWorld with gvim with 3 below lines. #!/bin/bash # 1st line impreratively # This is is a comment. echo 'Hello World!' -Modify his permissions $chmod 755 HelloWorld -Execute the script $./HelloWorld $ mkdir bin # From home directory $ mv HelloWorld bin/ [me@linuxbox ~]$ HelloWorld Hello World! $Export PATH=~/bin:"$PATH" $. .bashrc Script HTML (p386) µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ fwupd : Simple daemon allowing you to update some devices' firmware, including UEFI for several machines URL : https://wiki.archlinux.org/index.php/Fwupd ----------------------------------------------------------------------------------------------- $/usr/libexec/fwupd/fwupd --verbose $ fwupdmgr get-devices --show-all-devices #To display all devices detected by fwupd: $ fwupdmgr refresh #To download the latest metadata from LVFS $ fwupdmgr get-updates #To list updates available for any devices on the system $ fwupdmgr update #To install updates Note: Listed devices may not be updatable through fwupd (e.g. Intel integrated graphics). Alternative vendor solutions may be provided instead. µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ # DeepL for language $yarn # a lot of package will be installed $yarn global addl-translator-cli # Translate text into German $ deepl translate -t 'DE' 'How do you do?' # Pipe text from standard input $ echo 'How do you do?' | deepl translate -t 'DE' # Detect language $ deepl detect 'Wie geht es Ihnen?' # For help $ deepl -h $ deepl translate -h $ deepl detect -h # Install Google free open source translator $sudo dnf install translate-shell $trans -d #dictionary $trans -shell -brief #tranlate line by line Calculator --------------------------------------------------------------- https://www.2daygeek.com/linux-command-line-calculator-bc-calc-qalc-gcalccmd/ Soft interesting : ------------------------------------------------------- atom: word process slack : communication, as Teams Remmina : Remote access, as RDM NetExtender nono Teamviewer Chesse : Video+Photo Angry IP Scanner Keopatra : Graphical GPG Putty PyChess PDFArranger SpeedCrunch /science Root /Science #desc. https://root.cern.ch/building-root gcc-c++ putty rdesktop vim-enhanced xrdp gnupg2 (install seahorse by search package methode for easier for management of the key) pychess # Chess game entirely write in Python firewall **************************************************** Fedora 33 Server Installed 11/11/2020 ref URL ----------- https://ulyaoth.com/tips-tricks/how-to-install-a-graphical-desktop-on-fedora-server/ https://docs.fedoraproject.org/en-US/Fedora/25/html/Installation_Guide/sect-trouble-after-graphical-login.html #Booting into a Graphical Environment https://linuxconfig.org/how-to-configure-static-ip-address-on-fedora-31/ https://fedoraproject.org/wiki/Networking/CLI #Init Network : Ethernet & Wifi Install Graphical Interface -------------------------------- Step 1: List all available groups to install. $ yum group list Step 2: Install the Workstation group. $ yum groupinstall "Fedora Workstation" --skip-broken Step 3: Change systemd to start graphical mode. $ systemctl set-default graphical.target Return boot in text mode: -------------------- $ systemctl set-default multi-user.target Networking ----------- $sudo nmcli connection show # ethernet device name is enp0s3 $ sudo nmcli connection modify enp0s3 IPv4.address 192.168.1.127/24 $ sudo nmcli connection modify enp0s3 IPv4.gateway 192.168.1.1 $ sudo nmcli connection modify enp0s3 IPv4.dns 8.8.8.8 $ sudo nmcli connection modify enp0s3 IPv4.method manual --- $ sudo nmcli connection down enp0s3 $ sudo nmcli connection up enp0s3 Display overall status of NetworkManager $nmcli general status Display active connections $nmcli connection show --active Display all configured connections $nmcli connection show configured Connect to a configured connection by name $nmcli connection up id Disconnection by name $nmcli connection down id Wifi ------ Get Wifi status $nmcli radio wifi Turn wifi on or off $nmcli radio wifi List available access points(AP) to connect to $nmcli device wifi list Refresh previous list $nmcli device wifi rescan Create a new connection to an open AP $nmcli device wifi connect Create a new connection to a password protected AP $nmcli device wifi connect password Netwwork Interface ------------------ List available devices and their status $nmcli device status Disconnect an interface $nmcli device disconnect iface To create a new connection using an interactive editor $nmcli connection edit con-name To edit an already existing connection using an interactive editor $nmcli connection edit --- end of file --- ---------- End of file ------------------