Practical solutions

Linux Howtos How-To Guides

Solve the problem. Keep building. Collection of Linux how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Create Directory in BashThis article demonstrates how to create a folder if it doesn't already exist in Bash. How to Start, Stop and Restart Apache Web Server in LinuxLearn how to start, stop, and restart the Apache web server in Linux with our comprehensive guide. This article provides clear commands and explanations, making server management easy for both beginners and experienced users. Discover the importance of these operations for maintaining your web applications and ensuring a smooth user experience. How to Remove a File Extension in BashRemove a filename's final extension in Bash, use basename for a known suffix, or use cut to extract delimited text. How to Open HTML File Using BashLearn how to open an existing HTML file from Bash on macOS or Linux. On macOS, use open for the default application or open -a to choose an installed browser; on Linux, xdg-open uses the default application. How to Add Comments in Bash ScriptsLearn how to add comments in Bash scripts effectively using the How to Perform Undo and Redo Operations in Vim and ViLearn how to undo and redo changes in Vim and Vi, use `:undolist` and `:earlier` to navigate undo history, and understand undo grouping. How to Run GDB in a Bash ScriptCompile a C program with debugging symbols, run it under GDB from Bash, pass program arguments, and automate debugging commands. How to Use Grep With Multiple StringsThis article shows how to use grep to find lines containing one or more patterns. Fix `bash: make: command not found` in CygwinFix `bash: make: command not found` in Cygwin by installing the `make` package with the setup program or an existing apt-cyg installation. How to Check if a File Is Empty in BashThis article demonstrates different methods for checking if a file is empty in Bash. How to Shut Down a Linux Machine from the TerminalUse the Linux shutdown command to power off now, schedule a shutdown, notify users, reboot, or cancel a pending shutdown. How to Create Multi-Line String in BashLearn five ways to create multiline text in Bash and write it to a file with a here-document, a variable, printf, and two echo approaches. How to Change Directory With Git BashChange directories in Git Bash with cd. Check your location with pwd, navigate with relative or Windows drive paths, quote folder names with spaces, and use Tab completion. How to Check Whether a Bash Variable Is EmptyLearn four Bash ways to test a variable for an empty string, including safe quoting and how unset and whitespace-only values behave. How to Unzip .gz File in LinuxLearn how to decompress a .gz file or extract a .tar.gz archive on Linux with gunzip, gzip -d, and tar, and choose whether to keep the compressed original. How to Check if Input Argument Exists in BashThis tutorial describes checking if a script user has passed an input argument to a Bash script. How to Remove First Character From String in BashLearn three ways to remove the first character from a string in Bash, including native parameter expansion, sed, and cut. How to Read a File Line by Line Using BashLearn how to read a file line by line using Bash with our comprehensive guide. We explore various methods including the read command in loops and the mapfile command. Enhance your scripting skills and efficiently process text files with clear examples and detailed explanations. Perfect for beginners and experienced users alike, this article provides practical solutions for file handling in Bash. How to Split String Into Variables in BashSplit a delimited string into Bash variables with cut, IFS and read, sed, or regular-expression matching. String Comparison Operator in BashThis article explains the string comparison in Bash using an if statement. How to Pause Bash Shell Script for X SecondsLearn how to use read and sleep in Bash to pause a script How to Concatenate Strings in BashDiscover how to concatenate strings in Bash easily with our comprehensive guide. Learn various methods, including basic concatenation, using the += operator, and incorporating command substitution. Master these techniques to enhance your Bash scripting skills and create dynamic outputs effortlessly. Perfect for beginners and experienced users alike, this article provides clear examples and explanations to help you navigate string manipulation in Bash. How to Remove Empty Line in BashThis tutorial will discuss removing empty lines in Bash. How to Save Files in Vim Before Quitting the Vim EditorLearn how to save files in Vim before quitting the Vim editor with essential commands like :w, :q, and :wq. This guide provides a comprehensive overview of these commands, ensuring you can manage your files effectively and avoid losing your work. Mastering these commands will enhance your productivity and confidence while using Vim.