background preloader

Coderpad

Facebook Twitter

coderpad.blogspot.com

<a href="coderpad.blogspot.com">coderpad</a> publish articles related to linux, command line, programming ,coding and how to do stuff.

40 Essential Linux Commands That Every User Should Know. 40 Essential Linux Commands That Every User Should Know Linux is a family of open-source Unix operating systems based on the Linux Kernel. They include Ubuntu, Fedora, Debian, openSUSE, and Red Hat. Using Linux to manage a Virtual Private Server (VPS) is common practice. When operating Linux, you need to use a shell – a program that gives you access to the operating system’s services. Most Linux distributions use a graphical user interface (GUI), making them beginner-friendly. However, we recommend utilizing the command-line interface (CLI) because it’s quicker and offers more control. So if you want to use Linux, learning the common utilities or commands will go a long way. What Is a Linux Command? A Linux command is a program or utility that runs on the CLI – a console that interacts with the system via texts and processes.

Linux commands are executed on Terminal by pressing Enter at the end of the line. Here’s what a Linux command’s general syntax looks like: 1. sudo command sudo df -h. What is smoke testing in software engineering? Smoke Testing is a software testing method that determines whether the employed build is stable or not. It acts as a confirmation of whether the quality assurance team can proceed with further testing. Smoke tests are a minimum set of tests run on each build. Smoke testing is a process where the software build is deployed to a quality assurance environment and is verified to ensure the stability of the application. Smoke Testing is also known as Confidence Testing or Build Verification Testing. In other words, we verify whether the important features are working and there are no showstoppers in the build that is under testing. Characteristics of Smoke Testing: Following are the characteristics of the smoke testing: Smoke testing is documented.Smoke testing may be stable as well as unstable.Smoke testing is scripted.Smoke testing is a type of regression testing.

Smoke Testing is usually carried out by quality assurance engineers. Goal of Smoke Testing: The aim of Smoke Testing is: How to List Installed Packages on Ubuntu 22.04. It is often important to know how many packages are installed on your computer. You may not know it, but there are many packages installed on your computer. Many of them are pre-installed when you do a fresh install of your operating system. You may want to see and list these packages. In this article, you will learn how to list installed packages in the Ubuntu system. You will learn how to: List installed packages with aptList installed packages with dpkg-queryList recently installed packageslist the number of installed packagesList snap packages For this process, we use the Terminal command line application. Tip: We have tested the procedures and commands on Ubuntu 20.04 and Ubuntu 22.04.

List Installed Packages with apt The apt package manager comes pre-installed with the Ubuntu system. In order to list installed packages on your system, issue the following command in the Terminal: $ apt list --installed $ apt list --installed | grep <package> $ apt list --installed | grep zoom $ snap list. How to Install notepad++ Editor on Linux Mint. Notepad++ is an open-source and very popular source code and text editor. It was developed mainly for the Microsoft Windows operating system. It offers many more features than the Windows plain text editor. Notepad++s main features include syntax highlighting, bracket matching, multiple document display, auto-completion, code colors, and macro recording. Notepad++ is not available by default in Linux operating systems.

However, you can install it with the snap package. In this article, I will show two different methods to install Notepad++ on Linux Mint and Ubuntu via the command line and via GUI. There are two methods to install Notepad++ on Linux Mint: Using the graphical interfaceUsing the Ubuntu Software store To install Notepad++ using the GUI method, click on the Ubuntu Software icon from the left sidebar of the desktop as follows: The Ubuntu Software application will open on your system. You will see that the Notepad++ icon is displayed in the search results. . $ notepad-plus-plus. How to Install Steam on Ubuntu. Steam (developed by Valve Corporation) is a digital distribution service for video games.

It allows you to buy, install, and play games on your system. Steam is a cross-platform solution that is available for Windows Linux and MacOS. It offers you a store with plenty of games, video streaming, and other social networking services. In order to use Steam, you will need to install its client application on your system. In this article, we will explain how to install Steam on the Ubuntu system. We will explain the installation of the Steam application through the following ways: Through dpkg (Command Line)Through Ubuntu Software Center (GUI) Prerequisites Ubuntu 22.04 or Ubuntu 20.04 systemUser with sudo privilegesCurl and gdebi-core packages Note: We have run the procedure and commands on Ubuntu 20.04 LST OS. Install Steam through dpkg (Command Line) In the following method, we will download the Steam deb package and install it using dpkg command.

Step 1: Install prerequisites $ steam Remove Steam. How to Enable Low Graphics Mode in Ubuntu Linux. Every component of your operating system contributes somewhat to the consumption of your battery. The more active components you have at a particular instance, the more quickly you should expect your battery to be drained out. This is exactly why some people who prefer their laptops battery to last long want to enable low graphics mode. Therefore, in this article, we will explain to you the different methods with which you can enable low graphics mode in Ubuntu 22.04 and Ubuntu 20.04. Enabling Low Graphics Mode in Ubuntu For enabling low graphics mode in Ubuntu, you can make use of any of the two methods discussed below: Method # 1: To enable low graphics mode in Ubuntu by making use of the CompizConfig Settings Manager, you will need to perform the following steps: First of all, you will need to install the CompizConfig Settings Manager.

Now type the following command in your terminal and then press the Enter key: sudo apt-get update sudo apt-get install compizconfig-settings-manager. How to password protect files using Vim editor in Ubuntu. Vim is one of the most powerful and popular open-source command-line text editors. It is highly extensible and offers a lot of features that make it the top choice for most Linux users.

Among many other useful features, Vim has the ability to encrypt files with a password. It is easier and quicker to encrypt a file within Vim rather than using a separate tool. In this article, we will explain how to install and use Vim to create and open password-protected files. Please note that all the commands mentioned in this article have been tested on the Ubuntu 22.04 LTS.

Install Vim First, you will need to install the Vim editor on your system. . $ sudo apt install vim The system might provide you with a Y/n option to continue the installation. Create a password-protected file in Vim After the installation has been completed, now lets create a password-protected file in Vim. To create a password-protected file in Vim, type vim followed by x option and the filename, like this: $ vim x <filename.txt>

How to Add a User to Group on Linux. When we create a new user on a Linux operating system, at that time user creation some set of privileges are granted to each user. These user rights include some set of permission, such as Read, Write, and Execute. Therefore, based on the assigned privileges user can perform some set of functions or tasks on a system. Sometimes, multiple users may have the same privileges on an operating system. In this situation, the groups can be used on the Linux system. Linux group is defined as an organization of user accounts that have the same privileges. Linux Groups In the Linux operating system, we deal with two types of groups: The primary groupSecondary group The primary group users information is stored in the /etc/passwd file.

Add a user to a group First, you need to open the terminal on your system. To add an existing user in a single group, use the following command the terminal: $ sudo usermod -a -G Group-name User-name Example: $ sudo usermod -a -G debian10 kbuzdar Example: $ id User-name. How to Install notepad++ Editor on Linux Mint. How to Install Steam on Ubuntu. How to Enable Low Graphics Mode in Ubuntu Linux. How to password protect files using Vim editor in Ubuntu. How to Add a User to Group on Linux. How to Install ProFTPD on Ubuntu 22.04. The File Transfer Protocol (FTP) is still a widely used technology to move files over a computer network.

It is famous for being lightweight, and easy to set up and use. FTP has a bad reputation as an insecure protocol because it transmits passwords and data in plain text. However, modern FTP servers like ProFTPD support FTP over TLS, so the connection is encrypted using TLS/SSL. In this tutorial, I will show you how to configure ProFTPD so that the connection is encrypted using TLS. ProFTPd is an open-source FTP server application that allows you to set up your own FTP servers on Linux machines, even more so if they are dedicated servers or cloud instances. Prerequisites A fresh server instance, with Ubuntu 22.04 ( Focal Fossa ) installed.Sudo/root privileges for installing/configuring applications. Updating your system It is always a good idea to update your system before installing any packages or software, especially when it comes from external repositories. Sudo reboot now Conclusion. How to Write a Shell Script in Ubuntu.

What is a Shell Script? A shell script is a Linux-based script in which commands are written. When a user executes the script, all the commands that are in the script are executed one after another. Think of it like this: You have a task to do, for which you need to write a certain number of commands, and it is difficult to write and execute these commands one by one. To complete this task, you simply write all the commands in a single script and save that script file somewhere. Then, when the user needs to do a particular task, all he has to do is run the saved script and the task is done without having to write all the commands again one by one.

The shell is an interpreter of the commands that the user writes. How to write a Shell Script? We will use one of the built-in editors in Ubuntu to write a simple script. Right at the beginning, you need to type “nano” in the terminal window to open the text editor. nano This is usually already installed in Ubuntu. The script usually starts with #! . Find Devices Connected to Your Network with nmap on Ubuntu 22.04. As Ubuntu users, we may want to know if we are the only ones using our network, especially the WLAN, or if there are other unwanted users exploiting our network bandwidth. This capability and knowledge are also helpful when we want to be sure that no hacker is accessing our system by connecting to our network. This article describes step by step how to use the Nmap tool, which provides you with a list of all devices connected to your network. We have run the commands and procedures described in this article on Ubuntu 22.04 LTS. Step 1: Open the Ubuntu command line We will be using the Ubuntu command line, the Terminal, in order to view the devices connected to our network.

Open the Terminal either through the system Dash or the Ctrl+Alt+T shortcut. Step 2: Install the network scanning tool Nmap When it comes to reliable network scanning, Nmap is a tool that you can totally depend on. Enter the following command as sudo in the Terminal application in order to install the tool. $ ifconfig $ exit. Network Configuration in Debian 11. If you are a regular Linux user or a system administrator, you might require to set up networking on your system.

Unlike the desktop systems where you can use dynamic configurations, you will have to do specific configurations on servers depending upon your network environment. Dynamic configurations keep changing upon the server reboot so in some cases it becomes necessary to have static configurations for instance when a server needs to be remotely administered, or when a server is running an application or service that needs constant access. So, In this article, we will explain how you can set up a basic network in a Debian-based Linux OS. The basic setup includes setting a static IP, gateway, DNS, and hostname. We have used Debian 11 OS for describing the procedure mentioned in this article. View current network configuration To view current network configurations, run the following command in Terminal. . $ ip a You can also run ifconfig command to view the IP address. $ ifconfig 1. 2. 3. How to Install and Use Snapd on Debian 11. Snap packages are widely used all across different Linux distributions.

These packages are easier to create, install, and manage and they are there to keep all of your applications updated. However, to use these packages, you need to have an API installed which is known as Snapd. This API is responsible for managing snap packages on your Linux system. It communicates with the Snap Store to download and install snap packages on your Linux system. Most of the flavors of Linux have this API installed on them by default.

Enabling Snapd on Debian 11 For enabling Snapd on Debian 10, you will need to perform the following steps: First of all, you will need to launch the terminal in Debian 10. Before installing any new packages or APIs, it is highly advisable to update your system so that it is all set to install all the latest features. Sudo apt update This command is also shown in the following image: Once this command is executed successfully, you can easily install anything via the Internet. How to Show or Hide Line Numbers in Vim. Vim is a powerful and highly configurable command line editor that comes installed with most Linux operating systems. It offers many useful features for editing and configuration of files. However, some of its useful features are disabled by default. One of them is line numbering. With Vim line numbering features, you can display line numbering at the beginning of each line which comes helpful when modifying the text.

Vim has the following three line numbering modes: Absolute line numberRelative line numberHybrid line number This article explains how to show or hide line numbers in Vim editor. Note: Use the Ctrl+Alt+T keyboard shortcut to open the command line Terminal.We have tested the commands and procedure on Ubuntu 22.04 LTS OS. Show Absolute Line Numbers in Vim Editor It is the standard line numbering mode which shows the line numbers in the beginning of each line in the file. To show absolute line numbering, follow the below steps: 1. 2.

Set number set nu Hide Absolute Line Numbers 2. How to Shut Down Ubuntu. Ubuntu was originally a terminal-based operating system, but over time Linux slowly introduced the graphical user interface to its operating system. Nowadays, GUI methods are the only way to solve many problems with the operating system. We’ll show you some cool methods to shut down your system in Ubuntu like a pro! Ubuntu, like all other operating systems, offers several ways to shut down. These include such simple methods as clicking a button or passing commands to the system via a terminal. The commands shown in the tutorial have been tested on Ubuntu 22.04 and Ubuntu 20.04. Shutdown Ubuntu using the System menu If you are using an Ubuntu desktop, it is easy to shut down or turn off the system. CancelRestartShutdown You can make a decision within 60 seconds. Shutdown Ubuntu by using the Terminal The following instructions use the command line, so you can use them on Ubuntu servers and desktop systems and headless installations like cloud servers.

Power off and poweroff command Run: Nginx Performance Tuning. Linux csplit command explained (with examples) Get Linux System and Hardware Details on the Command Line. How to Configure Network Settings in Ubuntu. CoderPad.

Coderpad