In an administration career, the most frequent things which you encounter is commands. Linux commands are the foundation of administration career. Commands can be of different types based on their function like- An executable program this is the files which we see in /usr/bin in this category, programs can be compiled binaries such as programs written in C++, C or programs written in scripting languages such as the shell, Perl, Python, etc.
A shell function these are miniature shell script corporated into the environment. A command which is built into the shell itself. Bash has a number of commands internally called shell built-ins. The cd command is an example of shell builtin. An alias are the Linux commands that you can define by yourselves, that are built from other commands.
- uname – Know the kernel and OS related information.
- which – Use to Locate a Linux command.
- whereis – Use to know the location of command file
- type – Display information about command type.
- man – Display an on-line command reference.
- help – Display reference page for shell builtin.
- pwd – shows present working directory.
- cd – Change directories.
- ls – list files.
- mkdir – Creates a directory with name dirName.
- chown – change file owner and group.
- chmod – change the permission of file & directory.
- gzip – It compresses the contents of files, using complex mathematical algorithms.
- tar – It puts one file or several files into an archive. Compression is optional. It’s a somewhat complex Linux command with a number of choices available.
- find – to search file in a given directory.
- cat – The cat command displays the contents of a file, prints the complete contents to the screen without interruption. Cat is also used for create file as well as append content in file.
- grep – This Linux command finds a particular search string in the specified file. It displays the line in which the search string was found along with the file name, if the search string is found.
- diff – This Linux command compares the two files and displays the program lists that do not match. This is the most used commands by the programmer whenever they need to send only their program alterations instead of their entire source code.
- df – This Linux command when used without any options, it displays information about the total disk space, the free space on all the mounted drives and the disk space currently in use. If a directory is mentioned, the information is limited to the drive on which that directory is located.
- du – This Linux command, when executed without any elements, shows the total disk space occupied by files and sub-directories in the current directory.
- kill – We can kill the runaway program, by using kill command by specifying the respective process ID.
- su – The su Linux command makes it possible to login with a different user name from a running session.
When using the command without specifying a user name, you will be promoted for the root password.
- sudo – sudo (Super User DO) is for privileged user.
- touch – Used for creating blank file.
- whoami – Used to know the current user.
The above mentioned are the basic Linux commands, which Linux developer frequently encountered during development.