This is introduction to some common Linux commands is for you. These commands are the ones that Linux system administrators use frequently
# ls – lists directory contents
The ls command – the list command – functions in the Linux Terminal to show all of the major directories filed under a given file system.
For example, the command:
$ ls /etc
The ls command is used for viewing files, folders and directories. in the path.
#cd – changes directory
The cd command – change directory – will allow the user to change between file directories. As the name command name suggest, you would use the cd command to circulate between two different directories.
For example, the command:
$ cd /usr/bin
#mv – move files
The mv command – move – allows a user to move a file to another folder or directory. Just like dragging a file located on a PC desktop to a folder stored within the “Documents” folder, the mv command functions in the same manner.
For example, the command:
mv/arora/applications/majorapps /arora/applications/minorapps
The first part of the command mv/arora/applications/majorapps lists the application to be moved. In this case, arora. The second part of the command /arora/applications/minorapps lists where arora will be moved to – from majorapps to minorapps.
#man – displays manual pages
The man command – the manual command – is used to show the manual of the inputted command.
For example, the command:
man cd
The inputting command will show the manual or all relevant information for the change directory command.
#
mkdir makes directories
The mkdir – make directory – command allows the user to make a new directory. Just like making a new directory within a PC or Mac desktop environment, the mkdir command makes new directories in a Linux environment.
For Example:
mkdir testdirectory
The example command made the directory “testdirectory”.
#rmdir – removes directories
The rmdir – remove directory – command allows the user to remove an existing command using the Linux
For Example:
rmdir testdirectory
The example command removed the directory “testdirectory”. changes file timestamps
# rm – removes files and directories
The rm command – remove – like the rmdir command is meant to remove files from your Linux OS. Whereas the rmdir command will remove directories and files held within, the rm command will delete created files.
An example of the rm command:
rm testfile.txt
# pwd – prints the working directory
The pwd
command is your Linux system’s compass, in that it tells you where you are. It has no other function than supplying that bit of information to you. Try the following, and you will see that you’re in your home directory
An example of the pwd command:
$pwd
/home/user