How to List Open Ports in Firewalld?
To list the open ports in firewalld, the “firewall-cmd” command works with the “–list-ports” option. Before it, users ensure the active services of Firewalld.
To list the open ports in firewalld, the “firewall-cmd” command works with the “–list-ports” option. Before it, users ensure the active services of Firewalld.
The DNS Nameservers are set “(8.8.8.8 and 8.8.4.4)” in the “01-network-manager-all.yaml”, “/etc/resolv.conf” files. Also, the GUI method is explained here.
From the command line, you can use the “kill” and “pkill” commands to kill the running process by specifying the ID and name, respectively.
The “stat”, “ls” and “find” commands are used to find the mtime of files in Linux. They display the modification time when the file’s content is modified.
Linux provides the “nano” and “vim” text editors to edit or modify the host or any other file using the “sudo” privilege. It is easy to access and use.
To use the fg command in Linux, follow the general syntax “fg [Job]”. You can use different symbols to bring the jobs into the foreground in Linux.
In Linux, the ping command is used to troubleshoot networks, including the local machine network. The ping command comes preinstalled on Linux.
The BusyBox is the UNIX suite that contains different commands and functions of the Linux distributions in a single executable file.
To install the SFTP, run the command “sudo apt install ssh -y” and do the necessary configuration steps explained here.
QEMU/KVM can be installed by running the command “sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils -y” on Ubuntu 22.04.
In Bash, the until loop iterates the code until the specified condition is met. Using the until loop, users can modify conditions according to requirements.
The 5 best ways to uninstall the Software on Ubuntu is by using the utilities, including the apt, dpkg, snap, flatpak, and the Ubuntu Software.
The tar command compresses and extracts the files/directories. The tar xvf is used to extract the contents of the archive file with its verbose.
To show the line numbers in Vim / Vi in Linux, use the command “:set number”, “:set relativenumber”, and “:set number relativenuber”.
After accessing the “/proc/sys/vm/swappiness” file, you can change the swappiness value using “sudo” privileges that will apply to the operating system.
Linux offers the “history” utility with the “-c” option and “-w” option to clear the current session’s command history and all previous session history.
Linux offers the “tmpfs” and “/etc/fstab” files to create a ramdisk in the operating system. It is useful for storing and accessing data.
To increase the SSH connection timeout, change the values of ClientAliveInterval, and the ClientAliveInterval in the Server’s SSH configuration file.
To adjust the tmux pane size, use the mouse keys, the arrow keys with the prefix, or the commands used with the prefix.
Quest Score: 0%
To ping a specific port in Linux, we can use the tools of nc, nmap, and telnet. All these tools are useful for managing network interfaces.
CentOS offers the “lsb_release”, “hostnamectl”, and “uname” commands to check the CentOS version. Also, the “centos-release” file contains version information.
Linux offers the “ps-ef” command that lists out the running processes with the command line arguments passed to the process.
Sort output from largest to smallest by a combination of “du” and “sort” commands with the “h” option. It displays output in a human-readable format.
Linux offers a “more” command that allows you to view the contents of a text file or output one page at a time. The syntax with multiple examples is given here.
The cron jobs are scheduled by following the five asterisks pattern. Each asterisk denotes a time (minute, hour, day of the month, month, day of the week).
To check the available packages in the Yum package manager, the “yum list” and “yum info” commands are utilized in Linux System.
In Linux, the “ls” command works with “-l” and “-h” options to display the list of file sizes in a long and human-readable format, respectively.
To list all the iptables rules on Linux, run the command “sudo iptables -L -n -v | more” in the terminal. Read this tutorial for more details.
In Linux, the “free”, “top”, and “htop” commands are used to check the usage of RAM in the system. The “/proc/meminfo” file also contains RAM information.
To add Linux to Windows 10 Bootloader, either install the “Commercial” version of the EasyBCD or change the boot priority order of the UEFI menu.
Linux offers the “fdisk” command to create, delete, and modify the partition in the system. It requires the name of a hard disk to display information.
To use the nmap to scan all the computer ports from 0 to 65535, run the command “sudo nmap -p0-65535
The “source ~/.bashrc” command in Linux is used to update or refresh the changes made in the bashrc file to be applicable in shells permanently.
For testing purposes, telnet is used with the domain name by specifying the port number to ensure the specific port is open and reachable on a remote machine.
In Linux, the “known_hosts” file contains the host keys of remote servers. Each key is associated with the server address that is used for authentication.
To use the mail command for sending emails to the recipients, use the syntax “mail [Option] [Address]”. Different examples are used to explain its usage.
The “cURL” command sends the POST data from a file with the “-d” option. It requires the path to the file that contains the POST data.
In Linux, the “rsync” command is utilized to transfer files between remote and server systems over SSH by specifying the
To read a file line by line in a bash script, we can use the read command with the while loop or the cat command with the for a loop.
In Linux, the “ftp” command is utilized to transfer files between remote systems after establishing the connection through “ftp
To install Ubuntu alongside Windows Boot Manager, click the installation type with respect to it during installation and install it by assigning it some space.
Get the repository files of NordVPN, add them to your system, and then install NordVPN using the command “sudo apt install nordvpn”.
To run the SSH command for executing different commands in the remote machine, enter the remote machine’s shell with “ssh user@ip_address”.
Users can use the default recorder package known as gnome-sound-recorder or the audio recorder. The process of their usage/installation is explained.
To merge PDF files on Linux, pdftk, a command-line tool, and pdf arranger, a GUI tool, can be installed. A demonstration of the steps is provided in this post.
The cURL command is used in Linux to transfer data between two servers. The HTTPS Headers are responsible for sharing the additional data.
To install Virtualenv on Ubuntu 22.04, ensure that both python and pip are installed, then run the command “sudo apt install python3-venv -y” in a terminal.
To change the boot order and make the Windows default, run the command “sudo nano /etc/default/grub” and change the value of GRUB_DFAULT.
The xxd command converts the file’s contents into the Hexadecimal format. The xxd command can be used with its different options.
In Ubuntu, the “sudo apt upgrade” script is used to install updates via the command line after downloading all the latest versions of the required packages.
To display the list of containers in docker, run the “sudo docker container ls -a” command. It displays the information of the running container in the system.
First, change the port number from the file “sshd_config” and then use the syntax to transfer files/directories through SCP.
The file permissions 755 means that the owner has full access (read, write, and execute permissions), and the remaining users have only read and execute rights.
In Linux, the “PrtScr”, “Alt+PrtScr”, and “Shift+PrtScr” keys and third-party tools (Flameshot and Kazam) are used to take a screenshot.
The symlink of a directory is created by following syntax
In Linux, the “plt.show() not working” can be fixed by executing the “sudo apt install python3-matplotlib” script in the terminal.
In Linux, the error “pip importerror: cannot import name main” fixes by installing or upgrading the “pip” package manager.
To fix the “make:*** No rule to make target”, the users must ensure that the files compiling with the make command should be in the same directory.
To fix the “command not found: nvm” make sure the package of the nvm is installed, and the load lines are included in the shell script of Linux.
To fix the error of the “xterm: DISPLAY is not set”, we have to set the value of the DISPLAY environmental variable in the operating system.
To resolve this error in Python, declare as many variables as items in the iterable, use enumerate() and items() functions, split the string, etc.
To split an integer into digits, the str() and int() functions, str() with map(), for Loop, math.ceil() with math.log() function and divmod() function is used.
The max() function, sort() method, user-defined function, reduce() function, etc., are used in Python to find the maximum value in a list.
To count in a “for” loop, the traditional “for” loop, along with the addition operator “+” and the “enumerate()” function, is used in Python.
To convert the string to double in Python, the “float()” function and the “Decimal()” function of the “decimal” module are used.
To convert the pandas DataFrame to a NumPy array in Python, the “DataFrame.to_numpy()” function and the “DataFrame.values()” function is used.
To append a dictionary into a list in Python, the “append()”, “deepcopy()”, and List comprehension methods are used. Read this guide for detailed information
To fix the “ssh permission denied (publickey)” error, disable the password authentication in the SSH configuration file, and add the SSH key to the server.
To enable the playing mode of DVD, your Ubuntu system must be equipped with a media player and the “libdvd-pkg” which contains all the required codecs.
To list all the cronjobs, use the command “crontab -l”. To list specific cron jobs, use the command “ls -la /etc/cron.hourly/daily/weekly/monthly”.