Basic Linux commands

click fraud protection

When working with the Linux operating system is used a lot of different teams, starting from the most basic, and ending with rare and little-known.First of all beginners need to learn commands Linux, with which it is possible to obtain information about other teams.Any Unix user is required to use the command man.Typing the command line man, and then the interests of the team, can be found on the screen page online help.To exit the help you need to press the «q».Also, there is an alternative format call reference - a team info.The difference it is that the contents of the pages served to the screen in the form of separate sections and subsections, which are called nodes and sub-assemblies.

for convenient and fast work in the system is vital to know the basic Linux commands to manage files.Use the ls command to display the list of attributes of files and directories.Applying this command without any parameters, you will see the files and directories that are contained in the current directory.It should be noted that, by default ls hides certain files whose names begin with a dot.The cp command is used to copy files.First you need to specify the source file, and then the path where you want to copy it.Mv command is used to rename a file, or to move them to another directory.Rm is used to delete a file, if the key use -r, you can delete entire directories recursively.

are sufficiently important Linux commands for working with directories.To change the current directory, you must use a command like cd.If you need to find out which directory is currently the user should type the command pwd, and will display the absolute path to your directory.Teams Linux mkdir and rmdir respectively add and remove directories.It should be noted that the rmdir command can only delete empty directories for the complete destruction of the entire contents of the directory and use the command rm.

In Linux, you definitely need to view different types of files: text, scripts, and other binary data.It is therefore necessary to consider Linux commands to view the files.The simplest program can be called a cat, whose task - to copy the files to the output stream.If the file number, the team will unite them.To page through text often use command less.The tail command displays the last 10 lines of a file.Like her team head, with which you can read the first 10 lines of the file.

In a separate group of isolated Linux commands for creating and editing files.The touch command is typically used to create an empty file.Change the text files it is most convenient using the editor that there are a huge number.The most popular are nano, vi, vim, gedit, kate.

There are also commands that help to learn about the properties of the file.For example, the wc is used to calculate the number of bytes of individual words and lines in a file.To find out how much disk space occupied by files and folders that you need to use the command du.An important role in Linux playing privileges.For them there is a change in the command chmod.Moreover, the rights are recorded at the same time for three different types of users: for the owner, the user group, which includes the owner, and for all other users.The command argument, which specifies permissions can be written in one of two formats: numeric or symbolic.Find the file will help the team find.

useful for beginners will command the compression and packaging.The most popular is the command tar, which converts a number of files in the archive without compression.Such an archive called a tarball.To create a compressed archive to the tar command, you must add a few keys.