Tutorials on Linux, Programming & Technology

How to Add New Lines When Using echo

How to Add New Lines When Using echo?

To add new lines, use the “-e(backspace interpreter)” and “$(bash variable)” with the “echo” command. An “echo” tool can also be used multiple times to do this.

How to Install the Latest cURL on Linux

How to Install the Latest cURL on Linux?

In Linux and its distributions, the “curl” can be installed via default package managers i.e “apt” (Ubuntu/Debian), “yum” (CentOS/RHEL), and “dnf” (Fedora).

How To Generate A Strong Password In Linux

How to Generate a Strong Password in Linux?

To generate a strong password, use the “urandom”, “makepasswd”, “gpg”, “apg”, “pwgen”, and “openssl rand” commands. It can also be done using the “Perl” script.

How to Round a Number Down in Python

How to Round a Number Down in Python?

To round a number down the “math.floor()” function, “int()” function, “trunc()” function, “// operator”, and “numpy.floor()” function is used in Python.

How to Create a Directory in Python

How to Create a Directory in Python?

To create a directory at the existing location or at the specified path with permission, the “os.mkdir()” and the “os.makedirs()” methods are used in Python.

how Does find -name work

How Does find -name Work?

The “find -name” locates the files/directories by different parameters name, extensions, or searching and deleting the particular file/directory.

How to Loop Over the Lines of a File

How to Loop Over the Lines of a File?

Use the “for” and “while” loops in the shell script to read the file content line by line. Both these loops provide simple syntax to perform this task easily.

How Do I Create a Permanent Bash Alias

How to Create a Permanent Bash Alias?

To create a permanent bash alias, edit the “~/.bashrc” file in Linux. After that, reload it using the “source ~/.bashrc” command to activate newly alias.

How to Use Undo Functionality in Nano

How to Use Undo Functionality in Nano?

Different errors can be made while editing a text file using nano; use the “ALT+U” key to undo the operations and “CTRL+E” to redo the changes made.

How to Check RAM Size

How to Check RAM Size Using CLI?

To check the RAM size in the Linux, utilize the “/proc/meminfo file”, “free”, “top”, “vmstat”, “dmidecode”, “lshw”, or “hwinfo” utilities

Create an Empty List in Python

How to Create an Empty List in Python?

To create an empty list, the list() function and square brackets [ ] are used in Python. The nested empty list is created using the list comprehension method.

What is _declare_ in Bash

What is “declare” in Bash?

In Bash, the “declare” command sets the variable and functions alongside their attributes, “integer”, “string”, “array”, and “read-only” variables.

How to Restart the SSH Service

How to Restart the SSH Service?

Linux offers the “systemctl” and “service” commands to restart the “SSH” service instantly. It can also be restarted by accessing the “/etc/init.d” directory.

How To Change IP Address on Linux

How to Change IP Address on Linux?

To change an IP address, utilize the “ip”, “ifconfig”, and the “nmcli” command line tools or the “Network” window in the GUI method.

How to Make a for Loop in Command Line

How to Make a for Loop in Command Line?

In Linux, the “for” loop executes the block of statements repeatedly for every item in a list. It offers two types of syntax, i.e., “generalized” and “one line”.

How to Force a Clock Update Using NTP

How to Force a Clock Update Using NTP?

To force a clock update using the NTP server, use the “ntpdate” command and “ntpd” service. They synchronize the time on the system with the time NTP server.

How to Upgrade Java on Ubuntu

How to Upgrade Java on Ubuntu?

To upgrade Java on Ubuntu, use the “sudo apt install openjdk-19-jdk” command or download the latest version of Java from the Oracle website and install it.

How do I Find Out Users in a Group?

To find out which users are in a group within Linux, utilize the “groups”, “getent”, and “id -Gn” commands and the “/etc/group” file.