- cdcd (Change Directory): The cd command in Linux is used to change the current working directory in the shell. This command allows you to navigate between directories in the file system. Basic Usage: Example: The cd command is fundamental for navigating and managing the file system in a Linux environment.
- chrootchroot (short for “change root”) is a command in Unix-like operating systems, including Linux, that changes the apparent root directory (/) for the current running process and its children. This effectively isolates the process in a confined directory structure, known as a chroot jail, where it cannot access files and directories outside of the specified…
- historyhistory: The history command in Linux displays a list of the commands you have entered in the current shell session or in previous sessions. This list is typically numbered, showing the most recent commands at the bottom. Basic Usage: Common Options: Example: In this example, the history command shows the list of commands you’ve run,…
- Linux CommandsTo list all Linux commands, run compgen -c, help, or man -e in your Terminal screen. Run the utility with the –help flag to check a command’s manual and options. Base/Standard Commands: ls, pwd, cd: Basic navigation commands used to list files, print the current directory, and change directories. mkdir, rmdir, rm, cp, mv, touch: Basic file and directory manipulation commands….
- lsls (List): The ls command in Linux is used to list the contents of a directory. It displays files, directories, and their attributes, such as permissions, ownership, size, and modification time. By default, ls shows the names of files and directories in the current directory, but it can be used with various options to modify…
- lsof (LSOF)lsof (list open files) is a powerful command-line utility in Unix-like operating systems, including Linux, that displays a list of files currently opened by running processes. In Unix-based systems, almost everything is treated as a file, including regular files, directories, sockets, pipes, and device files, making lsof a versatile tool for system administration. Key uses…
- mkdirmkdir (Make Directory): The mkdir command in Linux is used to create new directories. You can create one or multiple directories at a time, specify the directory’s permissions, or even create parent directories if they don’t exist. Basic Usage: Common Options: Example: This command creates a directory named my_directory in the current working directory. Example…
- mvmv (Move): The mv command in Linux is used to move or rename files and directories. It can be used to relocate a file from one directory to another, or simply to rename a file or directory without changing its location. Basic Usage: Common Use Cases: Overwriting Without Prompt: Interactive Mode: Example with Multiple Files:…
- nohup (NOHUP)nohup (short for “no hang up”) is a command in Unix-like operating systems, including Linux, that allows you to run another command or script in the background, even after you log out or close the terminal session. When you run a command with nohup, it ignores the SIGHUP (hangup) signal, which is normally sent to…
- pwdpwd (Print Working Directory): The pwd command in Linux displays the full pathname of the current working directory. It tells you exactly where you are in the file system hierarchy, starting from the root (/) to your current directory. Usage: Example: In this example, pwd shows that the current working directory is /home/user/Documents. The pwd…
- renicerenice is a command in Unix-like operating systems, including Linux, used to alter the scheduling priority of a running process. The scheduling priority determines how much CPU time a process receives relative to other processes. By adjusting a process’s “nice” value, you can influence its priority, either to give it more CPU time (lower nice…
- systemdsystemd is a system and service manager for Linux, designed to start, stop, and manage processes and services during boot and throughout the system’s runtime. It is a replacement for the traditional SysVinit system and has become the default init system for many Linux distributions, including Ubuntu, Fedora, and CentOS. Key Features: Basic Commands: Example:…
- whowho: The who command in Linux displays information about users currently logged into the system. It shows details such as the username, terminal, login time, and, sometimes, the IP address or hostname from which the user is connected. Basic Usage: Example Output: In this example: Common Options: Example with Options: This command shows that the…
- whoamiwhoami: The whoami command in Linux displays the username of the current user who is executing the command. It effectively answers the question, “Who am I logged in as?” Basic Usage: Example: In this example, the command outputs user1, indicating that the current session is being run by the user user1. The whoami command is…