100 Commands in Linux Every Developer Should know💯🌟
Tags: linux, developer, coding, softwaredeveloper
Published: 2023-02-02 14:45:48

Get ready to add some powerful Linux commands to your toolkit and take your coding skills up a notch.

Whether you’re an experienced Linux user or just starting out, this list of 100 must-know Linux commands for developers will help you tackle any task with ease. We’ll start out with the basics, and then get to the more interesting ones.

By incorporating AI tools like [Bito AI](https://bito.co/), which helps you understand and optimize your code, you’ll be able to work smarter, not harder and become a 10x developer.

So get ready to unlock the power of Linux in your development workflow with these commands!

<ol>
<li><code>ls</code> — List the contents of the current directory.
	<ul>
		<li><code>ls</code>: This will list the files and directories in the current working directory.</li>
		<li><code>ls /usr/local</code>: This will list the files and directories in the <code>/usr/local directory</code>.</li>
	</ul>
</li>
<li><code>cd</code> — Change the current working directory.
	<ul>
		<li><code>cd /usr/local</code>: This will change the current working directory to <code>/usr/local</code>.</li>
		<li><code>cd ..</code>: This will change the current working directory to the parent directory of the current working directory.</li>
	</ul>
</li>
<li><code>mkdir</code> — Create a new directory.
	<ul>
		<li><code>mkdir mydir</code>: This will create a new directory called <code>mydir</code> in the current working directory.</li>
	</ul>
</li>
<li><code>rmdir</code> — Remove an empty directory.
	<ul>
		<li><code>rmdir mydir</code>: This will remove the empty directory called <code>mydir</code> from the current working directory.</li>
	</ul>
</li>

<li><code>touch</code> — Create a new file.
	<ul>
		<li><code>touch myfile.txt</code>: This will create a new, empty file called <code>myfile.txt</code> in the current working directory.</li>
	</ul>
</li>

<li><code>cp</code> — Copy a file or directory.
	<ul>
		<li><code>cp myfile.txt myfile_copy.txt</code>: This will create a copy of <code>myfile.txt</code> called <code>myfile_copy.txt</code> in the current working directory.</li>
		<li><code>cp -r mydir mydir_copy</code>: This will create a copy of the directory <code>mydir</code> called <code>mydir_copy</code> in the current working directory, including all the files and subdirectories in <code>mydir</code>.</li>
	</ul>
</li>

<li><code>mv</code> — Move a file or directory.
	<ul>
		<li><code>mv myfile.txt mydir</code>: This will move the file <code>myfile.txt</code> from the current working directory to the directory <code>mydir</code>.</li>
		<li><code>mv mydir newname</code>: This will rename the directory <code>mydir</code> to newname.</li>
	</ul>
</li>

<li><code>rm</code> — Delete a file.
	<ul>
		<li><code>rm myfile.txt</code>: This will delete the file <code>myfile.txt</code> from the current working directory.</li>
	</ul>
</li>

<li><code>cat</code> — Display the contents of a file.
	<ul>
		<li><code>cat myfile.txt</code>: This will display the contents of the file <code>myfile.txt</code> in the terminal.</li>
	</ul>
</li>

<li><code>less</code> — View the contents of a file one page at a time.
	<ul>
		<li><code>less myfile.txt</code>: This will display the contents of the file myfile.txt one page at a time in the terminal, allowing you to scroll through the file using the arrow keys. Press q to quit.</li>
	</ul>
</li>

<li><code>head</code> — Display the first few lines of a file.
	<ul>
		<li><code>head myfile.txt</code>: This will display the first 10 lines of the file <code>myfile.txt</code>. </li>
		<li><code>head -n 5 myfile.txt</code>: This will display the first 5 lines of the file <code>myfile.txt</code>. </li>
	</ul>
</li>

<li><code>tail</code> — Display the last few lines of a file.
	<ul>
		<li><code>tail myfile.txt</code>: This will display the last 10 lines of the file <code>myfile.txt</code>. </li>
		<li><code>tail -n 5 myfile.txt</code>: This will display the last 5 lines of the file <code>myfile.txt</code>. </li>
	</ul>
</li>

<li><code>grep</code> — Search for a pattern in a file.
	<ul>
		<li><code>grep “hello” myfile.txt</code>*: This will search for the pattern “hello” in the file <code>myfile.txt</code> and print any lines that contain the pattern.</li>
		<li><code>grep -r “hello”</code>*<code>: This will search for the pattern</code> “hello”  in all files in the current working directory and its subdirectories, and print the names of the files and the lines that contain the pattern.</li>
	</ul>
</li>

<li><code>find</code> — Search for a file by name.
	<ul>
		<li><code>find . -name “myfile.txt</code>: This will search for a file called <code>myfile.txt</code>in the current working directory and its subdirectories.</li>
		<li><code>find / -name “*.txt”</code>: This will search for all files with a <code>.txt</code>extension in the entire file system.</li>
	</ul>
</li>

<li><code>sort</code> — Sort the lines of a file.
	<ul>
		<li><code>sort myfile.txt</code>: This will sort the lines of the file <code>myfile.txt</code> in alphabetical order.</li>
		<li><code>sort -n myfile.txt</code>: This will sort the lines of the file <code>myfile.txt</code> in numerical order.</li>
	</ul>
</li>

<li><code>uniq</code> — Remove duplicate lines from a file.
	<ul>
		<li><code>uniq myfile.txt</code>: This will remove any duplicate lines from the file <code>myfile.txt</code>.</li>
		<li><code>sort -n myfile.txt</code>: This will remove any duplicate lines from the file <code>myfile.txt</code> and print the count of the number of times each line appears in the file.</li>
	</ul>
</li>

<li><code>wc</code> — Count the number of lines, words, and characters in a file.
	<ul>
		<li><code>wc myfile.txt</code>: This will print the number of lines, words, and characters in the file  <code>myfile.txt</code>.</li>
		<li><code>wc -l myfile.txt</code>: This will print the number of lines in the file <code>myfile.txt</code>.</li>
	</ul>
</li>

<li><code>cut</code> — Extract specific fields from a file.
	<ul>
		<li><code>cut -d “,” -f 2 myfile.txt</code>: This will extract the second field (delimited by a comma) from each line of the file myfile.txt and print the fields.</li>
	</ul>
</li>

<li><code>paste</code> — Combine the lines of two or more files.
	<ul>
		<li><code>paste file1.txt file2.txt</code>: This will combine the lines of <code>file1.txt</code> and <code>file2.txt</code> side by side and print the combined lines.</li>
		<li><code>paste -d “,” file1.txt file2.txt</code>: This will combine the lines of <code>file1.txt</code> and <code>file2.txt</code> and separate them with a comma, and print the combined lines.</li>
	</ul>
</li>

<li><code>tr</code> — Translate or delete specific characters from a file.
	<ul>
		<li><code>tr “a-z” “A-Z” < myfile.txt </code>: This will translate all lowercase letters in the file <code>myfile.txt</code> to uppercase and print the translated lines.	</li>
		<li><code>tr -d “0–9” < myfile.txt </code>: This will translate all lowercase letters in the file <code>myfile.txt</code> to uppercase and print the translated lines.</li>
	</ul>
</li>

<li><code>sed</code> — Edit a file using regular expressions.
	<ul>
		<li><code>sed “s/hello/hi/” myfile.txt </code>: his will replace all occurrences of the word <code>“hello”</code> with <code>“hi”</code> in the file <code>myfile.txt</code> and print the resulting lines.</li>
		<li><code>sed “s/^#//” myfile.txt</code>:  This will remove all leading # characters from the beginning of each line in the file <code>myfile.txt</code> and print the resulting lines.</li>
	</ul>
</li>

<li><code>awk</code> — Process and analyze a file using patterns and actions.
	<ul>
		<li><code>awk ‘{print $1}’ myfile.txt </code>: This will print the first field (delimited by whitespace) of each line in the file <code>myfile.txt</code>.</li>
		<li><code>awk -F “,” ‘{print $2}’ myfile.txt</code>:  This will print the second field (delimited by a comma) of each line in the file <code>myfile.txt</code>.</li>
	</ul>
</li>

<li><code>tar</code> — Create or extract a tarball (a compressed archive file).
	<ul>
		<li><code>tar -cvf mydir.tar mydir </code>: This will create a tarball called <code>mydir.tar</code> from the directory <code>mydir</code>.</li>
		<li><code>tar -xvf mydir.tar</code>: This will extract the contents of the tarball <code>mydir.tar</code> to the current working directory.</li>
	</ul>
</li>

<li><code>gzip</code> — Compress or decompress a file using<code>gzip</code>.
	<ul>
		<li><code>gzip myfile.txt </code>: This will compress the file <code>myfile.txt</code> using <code>gzip</code>, creating a new file called <code>myfile.txt.gz</code>.</li>
		<li><code>gunzip myfile.txt.gz </code>: This will decompress the file <code>myfile.txt.gz</code> using <code>gzip</code>, creating a new file called <code>myfile.txt</code>.</li>
	</ul>
</li>

<li><code>bzip2</code> —  Compress or decompress a file using <code>bzip2</code>.
	<ul>
		<li><code>bzip2 myfile.txt</code>: This will compress the file <code>myfile.txt</code> using <code>bzip2</code>, creating a new file called <code>myfile.txt.bz2</code>.</li>
		<li><code>bunzip2 myfile.txt.bz2</code>: This will decompress the file <code>myfile.txt.bz2</code> using <code>bzip2</code>, creating a new file called <code>myfile.txt</code>.</li>
	</ul>
</li>

<li><code>xz</code> — Compress or decompress a file using <code>xz</code>.
	<ul>
		<li><code>xz myfile.txt </code>:  This will compress the file <code>myfile.txt</code> using <code>xz</code>, creating a new file called <code>myfile.txt.xz</code>.</li>
		<li><code>unxz myfile.txt.xz </code>: This will decompress the file <code>myfile.txt.xz</code> using <code>xz</code>, creating a new file called  <code>myfile.txt</code>.</li>
	</ul>
</li>

<li><code>zip</code> — Compress or decompress a file using <code>zip</code>.
	<ul>
		<li><code>zip [myfile.zip](http://myfile.zip/) myfile.txt </code>: This will create a zip archive called <code>[myfile.zip](http://myfile.zip/)</code> from the file <code>myfile.txt</code>.</li>
		<li><code>unzip [myfile.zip](http://myfile.zip/)</code>: This will extract the contents of the zip archive <code>[myfile.zip](http://myfile.zip/)</code> to the current working directory.</li>
	</ul>
</li>

<li><code>chmod</code> — Change the permissions of a file or directory.
	<ul>
		<li><code>chmod u+x [myfile.sh](http://myfile.sh/) </code>:  This will add execute permission for the owner of the file <code>[myfile.sh](http://myfile.sh/)</code>.</li>
		<li><code>chmod g-w mydir</code>:This will remove write permission for the group owner of the directory <code>mydir</code>.</li>
	</ul>
</li>

<li><code>chown</code> — Change the owner and/or group of a file or directory.
	<ul>
		<li><code>chown user1 myfile.txt </code>: This will change the owner of the file <code>myfile.txt</code> to <code>user1</code>.</li>
		<li><code>chown user1:group1 mydir</code>: This will change the owner of the directory <code>mydir</code> to <code>user1</code> and the group owner to<code>group1</code>.</li>
	</ul>
</li>

<li><code>passwd</code> — Change the password of a user.
	<ul>
		<li><code>passwd </code>: This will prompt the user to enter and confirm a new password.</li>
	</ul>
</li>

<li><code>su</code> — Change the current user to another user.
	<ul>
		<li><code>su user1</code>: This will change the current user to <code>user1</code>. The user will be prompted to enter the password for <code>user1</code>.</li>
		<li><code>su -</code>: This will change the current user to the root user. The user will be prompted to enter the root password.</li>
	</ul>
</li>

<li><code>sudo</code> — Execute a command as another user, usually the root user.
	<ul>
		<li><code>sudo apt-get update</code>: This will update the package list for the package manager apt-get as the root user. The user will be prompted to enter their own password.</li>
	</ul>
</li>

<li><code>whoami</code> — Print the current username.
	<ul>
		<li><code>whoami</code>: This will print the username of the current user.</li>
	</ul>
</li>

<li><code>who</code> — Print information about logged-in users.
	<ul>
		<li><code>who</code>: This will print the username, terminal, and login time for all logged-in users.</li>
		<li><code>who -u</code>: This will print the username, terminal, and login time for all users with processes on the system.</li>
	</ul>
</li>

<li><code>last</code> — Print information about previous logins.
	<ul>
		<li><code>last</code>: This will print a list of all previous logins to the system.</li>
		<li><code>last -f /var/log/wtmp</code>: This will print a list of all previous logins to the system using the <code>file /var/log/wtmp</code> as the source of the login information.</li>
	</ul>
</li>

<li><code>history</code> — Print a list of previously executed commands.
	<ul>
		<li><code>history</code>: This will print a list of the previously executed commands for the current user.</li>
		<li><code>history -c</code>: This will clear the command history for the current user.</li>
	</ul>
</li>

<li><code>echo</code> — Print a message.
	<ul>
		<li><code>echo “Hello, world!”</code>: This will print the message <code>“Hello, world!”</code>.</li>
		<li><code>echo $SHELL</code>: This will print the path to the current shell.</li>
	</ul>
</li>

<li><code>printf</code> —  Print a formatted message.
	<ul>
		<li><code>printf “Hello, %s!\n” “world”</code>: his will print the message <code>“Hello, world!”</code>.</li>
		<li><code>printf “The value of pi is approximately</code> %.2f.\n 3.14159: <code>This will print the message</code> “The value of pi is approximately 3.14.”</li>
	</ul>
</li>

<li><code>env</code> — Print the current environment variables.
	<ul>
		<li><code>env</code>: This will print a list of all the current environment variables and their values.</li>
		<li><code>env | grep HOME</code>: This will print the value of the <code>HOME</code> environment variable.</li>
	</ul>
</li>

<li><code>export</code> — Set an environment variable.
	<ul>
		<li><code>export NEWVAR=”hello”</code>: This will set the environment variable NEWVAR to the value <code>“hello”</code>.</li>
		<li><code>export NEWVAR</code>: This will print the value of the environment variable <code>NEWVAR</code>.</li>
	</ul>
</li>

<li><code>unset</code> — Unset an environment variable.
	<ul>
		<li><code>unset NEWVAR</code>: This will unset the environment variable <code>NEWVAR</code>, removing it from the environment.</li>
	</ul>
</li>

<li><code>set</code> — Set shell options.
	<ul>
		<li><code>set -o vi</code>: This will set the vi editing mode for the current shell.</li>
		<li><code>set -o noclobber</code>: This will set the <code>noclobber</code> option, which prevents the shell from overwriting files with the > operator.</li>
	</ul>
</li>

<li><code>unalias</code> — Remove an alias.
	<ul>
		<li><code>alias ll=”ls -l”</code>: This will create an alias called <code>ll</code> that is equivalent to the command <code>ls -l</code>.</li>
		<li><code>unalias ll</code>: This will remove the alias <code>ll</code></li>
	</ul>
</li>

<li><code>source</code> — Execute a script in the current shell.
	<ul>
		<li><code>source [myscript.sh](http://myscript.sh/)</code>: This will execute the script <code>[myscript.sh](http://myscript.sh/)</code> in the current shell.</li>
	</ul>
</li>

<li><code>.</code> — Same as source.
	<ul>
		<li><code>[myscript.sh](http://myscript.sh/)</code>: This will execute the script <code>[myscript.sh](http://myscript.sh/)</code> in the current shell.</li>
	</ul>
</li>

<li><code>exec</code> — Replace the current shell with a command.
	<ul>
		<li><code>exec vim</code>: This will replace the current shell with the vim text editor. The user will not be able to return to the original shell unless they exit vim.</li>
	</ul>
</li>

<li><code>exit</code> — Exit the current shell.
	<ul>
		<li><code>exit</code>: This will exit the current shell.</li>
	</ul>
</li>

<li><code>shutdown</code> — Shutdown the system.
	<ul>
		<li><code>shutdown -h now</code>: This will shut down the system immediately.</li>
		<li><code>shutdown -r +5</code>: This will shut down the system and reboot it in 5 minutes.</li>
	</ul>
</li>

<li><code>reboot</code> — Reboot the system.
	<ul>
		<li><code>reboot</code>: This will reboot the system immediately.</li>
	</ul>
</li>

<li><code>init</code> — Change the system runlevel.
	<ul>
		<li><code>init 0</code>: This will shut down the system.</li>
		<li><code>init 6</code>: This will reboot the system.</li>
	</ul>
</li>

<li><code>mount</code> — Mount a filesystem.
	<ul>
		<li><code>mount /dev/sda1 /mnt</code>: This will mount the filesystem on <code>/dev/sda1</code> to the mount point <code>/mnt</code>.</li>
		<li><code>mount -o ro /dev/sda1 /mnt</code>: This will mount the filesystem on <code>/dev/sda1</code> to the mount point <code>/mnt</code>in read-only mode.</li>		
	</ul>
</li>

<li><code>umount</code> — Unmount a filesystem.
	<ul>
		<li><code>umount /mnt</code>: This will unmount the filesystem mounted on <code>/mnt</code>.</li>
		<li><code>umount -l /mnt</code>: This will <code>“lazy unmount”</code> the filesystem mounted on <code>/mnt</code>, allowing it to be unmounted even if there are open files on the filesystem.</li>
	</ul>
</li>

<li><code>fdisk</code> — Modify a disk partition table.
	<ul>
		<li><code>fdisk /dev/sda</code>: This will open the fdisk utility for the disk <code>/dev/sda</code>, allowing the user to create, delete, or modify the partitions on the disk.</li>
		<li><code>fdisk -l</code>:  This will list the partition table for all disks on the system.</li>
	</ul>
</li>

<li><code>mkfs</code> — Create a filesystem.
	<ul>
		<li><code>mkfs.ext4 /dev/sda1</code>: This will create an ext4 filesystem on the partition <code>/dev/sda1</code>.</li>
		<li><code>mkfs.xfs /dev/sdb2</code>:  This will create an <code>xfs</code> filesystem on the partition <code>/dev/sdb2</code>.</li>
	</ul>
</li>

<li><code>fsck</code> — Check and repair a filesystem.
	<ul>
		<li><code>fsck /dev/sda1</code>: This will check and repair the filesystem on <code>/dev/sda1</code> if necessary.</li>
		<li><code>fsck -a /dev/sdb2</code>:  This will check and repair the filesystem on <code>/dev/sdb2</code> if necessary, automatically fixing any errors that are found.</li>
	</ul>
</li>

<li><code>tune2fs</code> — Modify the parameters of an <code>ext2</code> or <code>ext3</code> filesystem.
	<ul>
		<li><code>tune2fs -l /dev/sda1</code>: This will display the current parameters of the <code>ext2</code> or <code>ext3</code> filesystem on <code>/dev/sda1</code>.</li>
		<li><code>tune2fs -c 5 /dev/sda1</code>:  This will set the maximum number of mount counts before a filesystem check is required to 5 for the <code>ext2</code> or <code>ext3</code> filesystem on <code>/dev/sda1</code>.</li>
	</ul>
</li>

<li><code>dumpe2fs</code> — Display the superblock and blocks group information of an <code>ext2</code> or <code>ext3</code> filesystem.
	<ul>
		<li><code>dumpe2fs /dev/sda1</code>: This will display the superblock and blocks group information of the <code>ext2</code> or <code>ext3</code> filesystem on <code>/dev/sda1</code>.</li>
		<li><code>dumpe2fs -h /dev/sda1</code>:  This will display the superblock and blocks group information in a more human-readable format for the <code>ext2</code> or <code>ext3</code> filesystem on <code>/dev/sda1</code>.</li>
	</ul>
</li>

<li><code>resizefs</code> — Resize an <code>ext2</code> or <code>ext3</code> filesystem.
	<ul>
		<li><code>resizefs /dev/sda1</code>: This will resize the <code>ext2</code> or <code>ext3</code> filesystem on <code>/dev/sda1</code> to fill the entire partition.</li>
		<li><code>resizefs -M /dev/sda1</code>:  This will resize the <code>ext2</code> or <code>ext3</code> filesystem on <code>/dev/sda1</code> to the minimum size required to hold the current files.</li>
	</ul>
</li>

<li><code>pvdisplay</code> — Display information about physical volumes in a LVM setup.
	<ul>
		<li><code>pvdisplay</code>: This will display information about all physical volumes on the system.</li>
		<li><code>pvdisplay /dev/sda1</code>:  This will display information about the physical volume on <code>/dev/sda1</code>.</li>
	</ul>
</li>

<li><code>vgdisplay</code> — Display information about volume groups in a LVM setup.
	<ul>
		<li><code>vgdisplay</code>: This will display information about all volume groups on the system.</li>
		<li><code>vgdisplay vg01</code>:  This will display information about the volume group <code>vg01</code>.</li>
	</ul>
</li>

<li><code>lvdisplay</code> — Display information about logical volumes in a LVM setup.
	<ul>
		<li><code>lvdisplay</code>: This will display information about all logical volumes on the system.</li>
		<li><code>lvdisplay /dev/vg01/lvol1</code>: his will display information about the logical volume lvol1 in the volume group <code>vg01</code>.</li>
	</ul>
</li>

<li><code>pvcreate</code> — Create a physical volume in a LVM setup.
	<ul>
		<li><code>pvcreate /dev/sda1</code>: This will create a physical volume on <code>/dev/sda1</code>.</li>
		<li><code>pvcreate /dev/sdb2 /dev/sdc3</code>: This will create physical volumes on <code>/dev/sdb2</code> and <code>/dev/sdc3</code></li>
	</ul>
</li>

<li><code>vgcreate</code> — Create a volume group in a LVM setup.
	<ul>
		<li><code>vgcreate vg01 /dev/sda1</code>: This will create a volume group called vg01 using the physical volume on <code>/dev/sda1</code>.</li>
		<li><code>vgcreate vg02 /dev/sdb2 /dev/sdc3</code>: This will create a volume group called <code>vg02</code> using the physical volumes on <code>/dev/sdb2</code> and <code>/dev/sdc3</code>.</li>
	</ul>
</li>

<li><code>lvcreate</code> — Create a logical volume in a LVM setup.
	<ul>
		<li><code>lvcreate -L 10G -n lvol1 vg01</code>:  This will create a logical volume called <code>lvol1</code> in the volume group <code>vg01</code> with a size of 10 GB</li>
		<li><code>lvcreate -l 100%FREE -n lvol2 vg01</code>: This will create a logical volume called lvol2 in the volume group <code>vg01</code> using all remaining free space in the volume group.</li>
	</ul>
</li>

<li><code>pvremove</code> —  Remove a physical volume from a LVM setup.
	<ul>
		<li><code>pvremove /dev/sda1</code>:  This will remove the physical volume on <code>/dev/sda1</code> from the system.</li>
		<li><code>pvremove /dev/sdb2 /dev/sdc3</code>:  This will remove the physical volumes on <code>/dev/sdb2</code> and <code>/dev/sdc3</code> from the system.</li>
	</ul>
</li>

<li><code>vgremove</code> — Remove a volume group from a LVM setup.
	<ul>
		<li><code>vgremove vg01</code>:  This will remove the volume group <code>vg01</code> from the system.</li>
		<li><code>vgremove vg02 vg03</code>: This will remove the volume groups <code>vg02</code> and <code>vg03</code> from the system.</li>
	</ul>
</li>

<li><code>lvremove</code> — Remove a logical volume from a LVM setup.
	<ul>
		<li><code>lvremove /dev/vg01/lvol1</code>: This will remove the logical volume <code>lvol1</code> from the volume group <code>vg01</code>.</li>
		<li><code>lvremove /dev/vg02/lvol2 /dev/vg03/lvol3</code>:  This will remove the logical volumes <code>lvol2</code> and <code>lvol3</code> from the volume groups <code>vg02</code> and <codE>vg03</code>, respectively.</li>
	</ul>
</li>

<li><code>lvresize</code> — Resize a logical volume in a LVM setup.
	<ul>
		<li><code>lvresize -L +5G /dev/vg01/lvol1</code>: This will increase the size of the logical volume  <code>lvol1</code> in the volume group <code>vg01</code> by 5 GB.</li>
		<li><code>lvresize -l +100%FREE /dev/vg02/lvol2</code>: This will increase the size of the logical volume <code>lvol2</code>  in the volume group <code>vg02</code> by the amount of free space in the volume group.</li>
	</ul>
</li>

<li><code>lvextend</code> — Extend a logical volume with additional physical volumes in a LVM setup.
	<ul>
		<li><code>lvextend -L +5G /dev/vg01/lvol1 /dev/sda1</code>: This will extend the logical volume <code>lvol1</code> in the volume group <code>vg01</code> by 5 GB using the physical volume on <code>/dev/sda1</code>.</li>
		<li><code>lvextend -l +100%FREE /dev/vg02/lvol2 /dev/sdb2 /dev/sdc3</code>: This will extend the logical volume lvol2 in the volume group vg02 by the amount of free space in the volume group using the physical volumes on <code>/dev/sdb2</code> and <code>/dev/sdc3</code>.</li>
	</ul>
</li>

<li><code>lvreduce</code> — Reduce the size of a logical volume in a LVM setup.
	<ul>
		<li><code>lvreduce -L -5G /dev/vg01/lvol1</code>: This will reduce the size of the logical volume <code>lvol1</code>  in the volume group <code>vg01</code> by 5 GB.</li>
		<li><code>lvreduce -l -100%FREE /dev/vg02/lvol2</code>:This will reduce the size of the logical volume <code>lvol2</code>  in the volume group <code>vg02</code>by the amount of free space in the volume group.</li>
	</ul>
</li>

<li><code>mkswap</code> — Create a swap area on a device.
	<ul>
		<li><code>mkswap /dev/sda1</code>: This will create a swap area on the partition <code>/dev/sda1</code>.</li>
		<li><code>mkswap /dev/sdb2 -L swap01</code>:This will create a swap area on the partition <code>/dev/sdb2</code> with the label <code>swap01</code>.</li>
	</ul>
</li>

<li><code>swapon</code> — Enable a swap area.
	<ul>
		<li><code>swapon /dev/sda1</code>: This will enable the swap area on the partition <code>/dev/sda1</code>.</li>
		<li><code>swapon -L swap01</code>:This will enable the swap area with the label <code>swap01</code>.</li>
	</ul>
</li>

<li><code>swapoff</code> — Disable a swap area.
	<ul>
		<li><code>swapoff /dev/sda1</code>: This will disable the swap area on the partition <code>/dev/sda1</code>.</li>
		<li><code>swapoff -L swap01</code>:This will disable the swap area with the label <code>swap01</code>.</li>
	</ul>
</li>

<li><code>chmod</code> — Change the permissions of a file or directory.
	<ul>
		<li><code>chmod 755 file.txt</code>: This will set the permissions of file <code>.txt</code> to <code>rwxr-xr-x.</code></li>
		<li><code>chmod u+x [file.sh](http://file.sh/)</code>:This will add execute permission for the owner of <code>[file.sh](http://file.sh/)</code>.</li>
	</ul>
</li>

<li><code>chown</code> — Change the owner and/or group of a file or directory.
	<ul>
		<li><code>chown user1 file.txt</code>: This will set the owner of <code>file.txt</code> to <code>user1</code>.</li>
		<li><code>chown user1:group1 file.txt</code>:This will set the owner of <code>file.txt</code> to user1 and the group to <code>group1</code>.</li>
	</ul>
</li>

<li><code>chgrp</code> — Change the group of a file or directory.
	<ul>
		<li><code>chgrp group1 file.txt</code>: This will set the group of <code>file.txt</code> to <code>group1</code>.</li>
		<li><code>chgrp -R group1 dir</code>:This will recursively set the group of all files and directories in <code>dir</code> to <code>group1</code>.</li>
	</ul>
</li>

<li><code>umask</code> — Set the default permissions for newly created files and directories.
	<ul>
		<li><code>umask 022</code>: This will set the default permissions for newly created files and directories to <code>rw-r — r — </code>.</li>
		<li><code>umask 077</code>:This will set the default permissions for newly created files and directories to <code>rwx — — —</code>.</li>
	</ul>
</li>

<li><code>su</code> — Change the current user.
	<ul>
		<li><code>su user1</code>: This will switch the current user to <code>user1</code>.</li>
		<li><code>su -</code>:This will switch to the root user and also load the root user’s environment.</li>
	</ul>
</li>

<li><code>sudo</code> — Execute a command as another user, typically the root user.
	<ul>
		<li><code>sudo ls /root</code>: This will execute the ls command as the root user, allowing the user to view the contents of the root user’s home directory.</li>
		<li><code>sudo -u user1 command</code>:This will execute command as the user <code>user1</code>.</li>
	</ul>
</li>

<li><code>passwd</code> — Change the password for a user.
	<ul>
		<li><code>passwd</code>: This will change the password for the current user.</li>
		<li><code>passwd user1</code>:This will change the password for the user <code>user1</code>.</li>
	</ul>
</li>

<li><code>adduser</code> — Add a new user to the system.
	<ul>
		<li><code>adduser user1</code>: This will create a new user called <e>user1</code>.</li>
		<li><code>adduser — disabled-password user1</code>:  This will create a new user called <code>user1</code> with a disabled password.</li>
	</ul>
</li>

<li><code>deluser</code> — Remove a user from the system.
	<ul>
		<li><code>deluser user1</code>:  This will remove the user user1 from the system.</li>
		<li><code>deluser</code> — remove-home user1: This will remove the user <code>user1</code> from the system and also delete the user’s home directory.</li>
	</ul>
</li>

<li><code>addgroup</code> — Add a new group to the system.
	<ul>
		<li><code>addgroup group1</code>:  This will create a new group called <code>group1</code>.</li>
		<li><code>addgroup — system group1</code>: This will create a new system group called <code>group1</code>.</li>
	</ul>
</li>

<li><code>delgroup</code> —  Remove a group from the system.
	<ul>
		<li><code>delgroup group1</code>: This will remove the group <code>group1</code> from the system.</li>
		<li><code>delgroup — only-if-empty group1</code>: This will only remove the group <code>group1</code> if it is empty.</li>
	</ul>
</li>

<li><code>usermod</code> — Modify a user account.
	<ul>
		<li><code>usermod -aG sudo user1</code>: This will add the user <code>user1</code> to the sudo group, allowing the user to execute commands with sudo.</li>
		<li><code>delgroup — only-if-empty group1</code>: This will lock the user  <code>user1</code> account, preventing the user from logging in.</li>
	</ul>
</li>


<li><code>groupmod</code> — Modify a group.
	<ul>
		<li><code>groupmod -n group2 group1</code>: This will rename the group <code>group1</code> to <code>group2</code>.</li>
		<li><code>delgroup — only-if-empty group1</code>: This will change the group ID of <code>group1</code> to 2001.</li>
	</ul>
</li>

<li><code>useradd</code> — Create a new user account.

	<ul>
		<li><code>useradd user1</code>: This will create a new user called <code>user1</code>.</li>
		<li><code>useradd -m -s /bin/bash user1</code>: This will create a new user called user1 with a home directory and the bash shell.</li>
	</ul>
</li>

<li><code>userdel</code> — Delete a user account.

	<ul>
		<li><code>userdel user1</code>: This will delete the user <code>user1</code> from the system.</li>
		<li><code>userdel — force — remove user1</code>: This will delete the user user1 from the system, including the user’s home directory and files, and force the deletion even if the user is still logged in.</li>
	</ul>
</li>

<li><code>groupadd</code> — Create a new group.

	<ul>
		<li><code>groupadd group1</code>: This will create a new group called <code>group1</code>.</li>
		<li><code>userdel — force — remove user1</code>:This will create a new group called <code>group1</code> and mark it as a system group.</li>
	</ul>
</li>

<li><code>groupdel</code> — Delete a group.

	<ul>
		<li><code>groupdel group1</code>: This will delete the group <code>group1</code> from the system.</li>
		<li><code>groupdel — force group1</code>:This will delete the group <code>group1</code> from the system, even if the group is not empty.</li>
	</ul>
</li>

<li><code>visudo</code> — Edit the sudoers file.
	<ul>
		<li><code>visudo</code>: This will open the sudoers file in the default editor, allowing the user to edit the file.</li>
		<li><code>visudo -f /etc/sudoers.d/custom</code>:This will open the custom file in the <code>/etc/sudoers.d</code> directory in the default editor, allowing the user to edit the file.</li>
	</ul>
</li>

<li><code>apt</code> — Advanced Package Tool. A package manager for Debian and Ubuntu systems.
	<ul>
		<li><code>apt update</code>: This will update the list of available packages and their versions.</li>
		<li><code>apt install package1 package2</code>:This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>apt remove package1 package2</code>:This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>apt-get</code> — Advanced Package Tool. A package manager for Debian and Ubuntu systems.
	<ul>
		<li><code>apt-get update</code>: This will update the list of available packages and their versions.</li>
		<li><code>apt-get install package1 package2</code>:This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>apt-get remove package1 package2</code>:This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>yum</code> — Yellowdog Updater, Modified. A package manager for CentOS, Fedora, and Red Hat systems.
	<ul>
		<li><code>yum update</code>: This will update all installed packages to their latest versions.</li>
		<li><code>yum install package1 package2</code>:This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>yum remove package1 package2</code>:This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>dnf</code> — Dandified Yum. A package manager for CentOS and Fedora systems.
	<ul>
		<li><code>dnf update</code>: This will update all installed packages to their latest versions.</li>
		<li><code>dnf install package1 package2</code>:This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>dnf remove package1 package2</code>:This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>pacman — Package Manager</code> — A package manager for Arch Linux and Manjaro systems.
	<ul>
		<li><code>pacman -Syu</code>: This will synchronize the package database and update all installed packages to their latest versions.</li>
		<li><code>pacman -S package1 package2</code>:This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>pacman -R package1 package2</code>:This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>zypper — ZYpp Package Manager</code> — A package manager for <code>openSUSE</code> and <code>SLE systems</code>.
	<ul>
		<li><code>zypper update</code>: This will update all installed packages to their latest versions.</li>
		<li><code>zypper install package1 package2</code>:This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>zypper remove package1 package2</code>:This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>apk — Alpine Linux Package Manager</code> — A package manager for Alpine Linux systems.

	<ul>
		<li><code>apk update</code> : This will update the package database</li>
		<li><code>apk add package1 package2</code>: This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>apk del package1 package2</code>: This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>emerge — Gentoo Package Manager</code> — A package manager for Gentoo systems.

	<ul>
		<li><code>emerge — update world</code>:  This will update all installed packages to their latest versions.</li>
		<li><code>emerge package1 package2</code>: This will install the packages <code>package1</code> and <code>package2</code>.</li>
		<li><code>emerge — unmerge package1 package2</code>: This will remove the packages <code>package1</code> and <code>package2</code> from the system.</li>
	</ul>
</li>

<li><code>pkg — Package Manager</code> - A package manager for <code>FreeBSD</code> systems.</li>

</ol>

Alright, that’s 100! Hope you find it helpful. Please let me know what you think.