Linux Command Guide

Search and explore various Linux commands.

Ask AI

Summarize the situation you want to resolve in up to 300 characters and ask the AI which commands you need.

Search freely

Click on the desired category to filter the commands. You can also enter a keyword to search for specific content.

basename

basename: Extract Filename from Path

The basename command removes directory components from a given file path, extracting the pure filename or directory name. It is commonly used in shell scripts when only the filename is needed, returning the last component of the path.

Learn more

basename-u

basename-u: Extracting Filenames (basename command)

This document addresses the 'basename-u' command. However, 'basename-u' does not exist in the standard Linux command list. Assuming the user either mistyped 'basename' or is referring to a non-standard script/alias used in a specific environment, this guide provides instructions for the standard 'basename' command. 'basename' is used to remove the directory portion from a given path and extract the pure filename or directory name.

Learn more

basename-w

basename-w: Extract Filename from Path (Virtual)

basename-w is a virtual command that extracts the pure filename or the last directory name from a given file path, excluding the directory portion. It is similar to the standard `basename` command but may include processing related to a specific width. This command is not included by default in standard Linux systems.

Learn more

cd

cd Command Guide: Basics of Directory Navigation

The `cd` command (change directory) is one of the most fundamental commands used in Linux and Unix-based operating systems to change the current working directory (location). It helps users easily navigate to desired locations within the file system. This guide will help you learn the various usages of the `cd` command.

Learn more

chattr

chattr: Change File Attributes

The chattr command is used to change the attributes of files on Linux filesystems (like ext2/3/4, XFS, Btrfs, etc.). These attributes, separate from standard file permissions (chmod), control how files behave. For example, you can make files unchangeable or undeletable (immutable), or allow only appending (append-only).

Learn more

chgrp

chgrp: Change File/Directory Group Ownership

The chgrp command is used to change the group ownership of specified files or directories. It is an important part of file system permission management, useful for controlling access to resources by users belonging to specific groups.

Learn more

chmod

chmod: Change File and Directory Permissions

The chmod command is used to change the access permissions (read, write, execute) of files and directories. The `-R` (recursive) option is particularly useful for batch permission changes across a specified directory and all its subfiles and subdirectories, making it very effective for large-scale permission configuration tasks.

Learn more

chown

Mastering the chown Command

A guide to the `chown` command in Linux used to change the owner (user) and group of files and directories. Use this tool to easily understand and apply ownership settings.

Learn more

cp

cp Command Guide: Copying Files and Directories

The `cp` command (copy) is used in Linux and Unix-based operating systems to copy files or directories. It is essential when creating duplicates while preserving the original files/directories. This guide will help you learn various uses of the `cp` command.

Learn more

diff-r

diff -r: Recursive Directory Comparison

The `diff` command is used to find differences between two files. Adding the `-r` (or `--recursive`) option allows it to recursively compare the contents of two directories, reporting in detail which files differ or exist only in one of the directories. This is extremely useful for tracking and managing changes in codebases, configuration files, or data directories.

Learn more

dirname

Guide to the dirname Command

The `dirname` command is used to extract the directory path without the file name from a given file path. It is particularly useful in shell scripts when referencing other files or directories based on the location of a file.

Learn more

du

du: Check Disk Usage

The du command reports the disk space usage of files and directories. It is particularly useful with the -sh option to check the total size of a specific directory in a human-readable format, and is essential for diagnosing disk space issues.

Learn more
Page 1 / 5 Next