Linux Commands 25 Very Useful Linux Commands for Developers
Linux Commands currently, Linux is one of the most accessible operating systems, although many people are unaware of it. Thus, although Windows has a more significant presence on computers worldwide, more and more users are opting for Linux, mainly in the community of programmers. The reasons: its reliability and security. If you are an inventor and interested in this system, don’t miss this selection of handy Linux commands to make your day-to-day life more manageable.
What are you going to see in this post?
What is Linux?
Linux is an operating system or kernel created by a brilliant computer science student, Linus Torvalds. Working on the UNIX operating system (proprietary software), he realized that it needed improvement, so he thought of creating a system that would be receptive to changes and modifications from other users. Linux was born, a free, open-source operating system released in 1991, whose list of functions is quite similar to UNIX. It is also multi-user, multi-tasking and multi-platform. It has a line parallel to Windows and can be used through commands.
Thousands of programmers began working to improve Linux, allowing the operating system to multiply. Being accessible and executable on PC platforms, many of its users are developers.
If you want to start using Linux or manage yourself more quickly in this operating system, don’t miss this list of 25 essential commands :
Essential Linux Commands for Developers
1 . Commandment
One of the first commands you should know in Linux is. We can see the use of all Linux commands, showing a view with information such as name, synopsis, description, options, exit status, return values, errors, files, versions, examples, etc. For example, if you want to know the “cd” command and its options, you have to run the knowledge to understand its description and usage. Inman cd
2. Command touch
This command is used to create any new file type on Linux systems. It is beneficial for developers to allow files to be made on the server. Also, it is used to change the time of access and modification of files.
catIt is one of the most used in Linux. The name of the command cat comes from ” concatenate “, its functionality to attach files or join, add. It can read, link files, combine files, and write file contents to standard output.
Also used to display the content of a file, copy content from one file to another, display the line number, or display $ at the end of the line.
Type cat followed by the file name and its extension to run this command. For example, cat archivo.txt
Another of the most useful commands in Linux is the change directory o command. With the help of this command, we can browse all our directories on our system. The options that it allows us would be:
- [Change from the current directory to a new directory]
- [Change directory using an absolute path]
- [Change directory using relative path]
- [Change to the home directory]
- [Change to the previous directory]
- [Change to the home directory]
- [Change to the root directory]
- [Change to another user’s home directory]
- [Change to the directory with spaces]
- [Change up to multiple subdirectories]
This command lists the contents of the desired directory, files, and other nested directories. When used with no options or arguments, ls returns an alphabetical list of the names of all files in the current working directory.
If you want to see the contents of other directories, type ls and then give the directory path:
You can use these variations with the ls command :
- ls) -R List all files in subdirectories
- ls)-a List hidden files
- ls)-al Show files and directories with detailed information such as permissions, size, owner, etc.
6. Command vim
vim is a free and open-source terminal text editor. You can use it as your code editor.
7. Command sed
The stream editor is a powerful bulk search and replaces command, but it’s also a legitimate text editor.
8. Command tar
This command is used to create and extract archive files. The “-cf” and “-xf” flags create and extract archives.
9. Command PWD
The command pwdis used to locate the path of the working directory you are in. For example, if my username is “Miriam” and I am in my Documents directory, the absolute way would be: /home/Miriam/Documents.
10. Command mkdir
This command allows users to create directories (folders). It enables the creation of several guides at the same time, as well as setting the permissions for the directories.
11. Command find
You can use the command to search the files to search for files and directories based on their permissions, type, date, ownership, size, etc. It can also be combined with other tools like grep or sed.
rm removes each file specified on the command line and directories. Be very cautious when using it because it cannot be undone, and it isn’t easy to recover files deleted this way.
To delete a normal file, you need to write the following syntax :
rm file_to_copy. txt
13. Command diff
The command diff helps us compare two files line by line and show their difference. This command-line utility lists the changes you must apply to make the duplicate files.
14. Command chown
shown allows you to change the owner of the file or directory. It can also change the group ownership for the file or directory.
15. Command uniq
unique helps us detect the adjacent duplicate lines and remove the duplicate lines. The unit filters continuous matching lines from the input file (which is required as an argument) and writes the filtered data to the output file.
16. Command wget
This command allows you to download files from the Internet. Supports popular network protocols like FTP, HTTP, and HTTPS. It can also handle HTTP proxies.
17. Command top
The command top displays a view of running processes in Linux in real-time and shows tasks managed by the kernel. Also, it offers a summary of system information to see resource utilization, memory and CPU usage.
18. Command grep
grep « global regular expression print » command filters the content of a file to facilitate our search.
grep < searchWord >
grep “linux” long. txt
19. Command df
It displays the amount in percentage and KB of free disk space available on Linux.
20. Command kill
This is used to close a process that does not end by helping to terminate it manually. It works by sending a signal that removes or kills a particular function or group of processes.
pings one of the most used commands that help us troubleshoot, test and diagnose network connectivity issues. This command has more options, including checking if a host is reachable, if a server is up, your internet connection, and possible network delays.
22. Command ldd
The command allows users to know the shared object dependencies of an executable file or shared library of an executable. add
23. Command lsof
The command lsof, short for ” list of open files .”, lists information about open files by processes running on the system.
24. Command objdump
Allows you to disassemble object files or executable files. It also helps you get additional information that a binary file may contain in a readable format.
25. Command shutdown
This command safely stops the system. When it shutdowns, all logged-in users and processes are notified that the system is going down, and no further logins are allowed. It gives you the option to shut down the system immediately or at a specific time.
Linux Command Cheat Sheet
Here is a reference table to access all the commands quickly and easily:
|man||Show help information for the specified command.|
|touch||Create any new type of file on Linux systems.|
|cat||Concatenate files, combine them and write file contents.|
|cd||Browse all our directories in our system.|
|ls||List the contents of the directory, files and other nested directories.|
|vim||Free and open-source terminal text editor.|
|sed||Find or replace in bulk.|
|tar||Create and extract archive files.|
|PWD||Locate the path of the working directory you are in.|
|mkdir||Create directories (folders).|
|find||Search for files and directories based on their permissions, type, date, ownership, size, etc.|
|rm||Delete files and directories.|
|diff||Comparison of two files line by line and show the difference between them.|
|chown||Change the owner of the file or directory.|
|Uniq||Detect adjacent duplicate lines and remove duplicate lines.|
|wget||Download files from the Internet.|
|top||Show running processes managed tasks.|
|grep||Filter the content of a file to facilitate our search|
|df||Show the sum of free disk space available.|
|kill||Close a process that does not finish to terminate it manually.|
|ping||Troubleshoot and diagnose network connectivity issues|
|add||Know the shared object dependencies of an executable file.|
|lsof||List information about the open files.|
|objdump||Disassemble object files or executable files.|
|shutdown||Stop the system safely.|
Linux Command Summary
For example you belong to the world of software development and you like to work with Linux sooner rather than later. In that case, you will start looking for information about its commands since it is a direct way to improve your productivity.
They are not all that is, but they are all that is. Although we have compiled some of the most important here, there are more useful Linux commands. Therefore, if you miss any or know any interesting, share it with us on our social networks.