How to Count String Occurrences in a Text File

The GUI text editor gives you a separate panel in the footer to inform you of the number of words, lines, and characters in your text file. Even though you can easily find the number of strings that occurred in your text file using this

Beginners Guide for Eval Command on Linux

The eval command is used to execute specified arguments as a single command in the current command-line processing and return its result. It will combine (or construct) the arguments into a single string and use it as input to the shell, which will execute the

Beginners Guide for Alias Command in Linux

In Linux, the alias command is used to create shortcuts for long commands that have the same functionality as if you were writing the whole command. This way, you can improve your productivity and save time by creating a few aliases for the long or

How to Shrink Long or Multiple Commands into a Single Short Command

Do you still type the long “sudo apt update && sudo apt upgrade -y” commands each time you want to update your Debian-based system? Or are you still navigating into directories (ex: “/var/www/html“) using the cd command each time you have to modify something there?

How to Add a Directory to the $PATH Variable in Linux

In Linux, whenever you want to execute any executable program or script, you need to jump into the directory and execute your program or script. But when you execute system commands like ls, pwd, echo, apt, and nano, you don’t need to jump into any

Beginners Guide for Source Command in Linux

The source is a built-in command-line tool that reads and executes the commands from the specified file (in order) as its argument in the current shell. Each command from the specified file will be delivered to the TCL interpreter to be read and run, making

Beginners Guide for Env Command on Linux

The env command is an advanced version of printenv with a few more features to tweak your environment variables, like setting new environment variables, printing all environment variables, or executing a command or script in a modified environment. I would also suggest you read the

Beginners Guide for Printenv Command on Linux

The printenv command is an alternative to the env command used to fetch the value of a specified variable name (key) used as an argument. If no variable name is assigned to printenv, it will print all environment variables in your system. Tutorial Details Description

Difference Between /etc/profile, ~/.bash_profile, ~/.profile, ~/.bashrc, etc

The bash or any other shell uses multiple profiles, also known as shell configuration files, like “/etc/profile“, “~/.bash_profile“, “~/.profile“, “~/.bash_login“, “~/.bashrc“, “~/.bash_history“, and “~/.bash_logout” to configure the user’s interactive login or non-login shell. Files Description /etc/profile It stores the variables, aliases, functions, etc. that are

How to Set and List Environment Variables in Linux

The environment variables are a set of key-value pairs that define the shell environment and can affect the behavior of the ongoing programs that are executed in the current shell session. The programs running in the current shell session can access the variable values from

Different Ways to Search Files or Directories on Linux

In Linux, you have multiple tools that can help you find the absolute path for files and directories in your system. Today, you’ll learn about those tools from basic to advanced, including their pros and cons to help you easily distinguish between them and decide

35+ Advance Examples of the Find Command in Linux

The find command is an advanced tool for searching files or directories rigorously in your file system, taking a little longer time than its alternative tools like the locate command. It’s due to its nature of searching a specified file by walking through each file