Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Linux Command

datecommand:date command is used to display the system date and time. date


command is also used to set date and time of the system. By default the date
command displays the date in the time zone on which unix/linux operating system is
configured.You must be the super-user (root) to change the date and time.

catcommand: Cat(concatenate) command is very frequently used in Linux. It reads


data from the file and gives their content as output. It helps us to create, view,
concatenate files. 

ls command: ls command is one of the most frequently used command in


Linux.ls with no option list files and directories in bare format where we won’t be
able to view details like file types, size, modified date and time, permission and links
etc.

mkdir:mkdir command in Linux allows the user to create directories (also referred


to as folders in some operating systems ). This command can create multiple
directories at once as well as set the permissions for the directories.
passwd command:passwd command in Linux is used to change the user account
passwords. The root user reserves the privilege to change the password for any user
on the system, while a normal user can only change the account password for his or
her own account.

rm command:rm stands for remove here. rm command is used to remove objects


such as files, directories, symbolic links and so on from the file system like UNIX. 

rmdircommand:rmdir command is used remove empty directories from the


filesystem in Linux. The rmdir command removes each and every directory specified
in the command line only if these directories are empty .
whocommand:who command is used to find out the following information :
1. Time of last system boot
2. Current run level of the system
3.List of logged in users and more.
Description : The who command is used to get information about currently logged in
user on to system.

whoami command:whoami command is used both in Unix Operating System and


as well as in Windows Operating System.
 It is basically the concatenation of the strings “who”,”am”,”i” as whoami.
 It displays the username of the current user when this command is invoked.
 It is similar as running the id command with the options -un.

cpcommand:cp stands for copy. This command is used to copy files or group of


files or directory. It creates an exact image of a file on a disk with different file
name. cp command require at least two filenames in its arguments.

mv command:mv stands for move. mv is used to move one or more files or


directories from one place to another in file system like UNIX. It has two
distinct functions:
(i) It rename a file or folder.
(ii) It moves group of files to different directory.
No additional space is consumed on a disk during renaming. This command
normally workssilently means no prompt for confirmation.
Gcc command:GCC stands for GNU Compiler Collections which is used to
compile mainly C and C++ language. It can also be used to compile Objective
C and Objective C++. The most important option required while compiling a
source code file is the name of the source program, rest every argument is
optional like a warning, debugging, linking libraries, object file etc. The
different options of gcc command allow the user to stop the compilation
process at different stages.

ps command:As we all know Linux is a multitasking and multi-user systems.


So, it allows multiple processes to operate simultaneously without interfering
with each other. Process is one of the important fundamental concept of the
Linux OS. A process is an executing instance of a program and carry out
different tasks within the operating system.

nano: When working on the command line quite often you will need to
create or edit text files. Two of the most powerful and popular used command
line editors are Vim and Emacs. Both of them have a steep learning curve that
can be intimidating to new users. For those who need a simple editor, there is
nano.
chmod: In Unix-like operating systems, the chmod command is used to
change the access mode of a file.
The name is an abbreviation of changemode.

You might also like