The Unix Survival Kit: A List of Must-Know Commands for Every User

Basic Commands Of Unix

The Unix operating system is a powerful platform that is used by millions of people around the world.

It provides a command-line interface that allows users to enter commands and interact with the operating system.

In this article, we will take a look at some of the basic commands that are commonly used in Unix.

















































Command Description
ls This command is used to list the files and directories in a directory. You can use the -l option to display the files in a long format, which includes additional information such as the file size, permissions, and modification date.
cd This command is used to change the current working directory. For example, to change to the /home/user directory, you would enter cd /home/user.
pwd This command is used to display the current working directory. It is often used to verify that you are in the correct directory before running other commands.
mkdir This command is used to create a new directory. For example, to create a new directory called newdir, you would enter mkdir newdir
cp This command is used to copy files and directories. For example, to copy the file file.txt to the directory /home/user, you would enter cp file.txt /home/user.
mv Renames or moves a file.
rm Deletes a file.
rmdir Deletes an empty directory.
echo Prints a message to the console.
cat Displays the contents of a file.

Here is an example of how you might use some of these commands in a Unix shell:

$ ls
file1.txt file2.txt file3.txt
$ cd /home/user/documents
$ ls
report.pdf proposal.doc budget.xls
$ pwd
/home/user/documents
$ cp proposal.doc proposal-backup.doc
$ mv proposal-backup.doc /home/user/backups
$ rm budget.xls
$ mkdir project1
$ rmdir project1
$


Reference Books

Here are the books I’ve used as references for writing this article,
please feel free to read them If you don’t want your knowledge to be
limited to this article alone.