How many linux commands are there




















Linux Commands frequently used by Linux Sysadmins — Part 2: All-in-one for vmstat, iostat, netstat, and ifstat. Glances and nmon — htop and top Alternatives: Linux Commands frequently used by Linux Sysadmins — Part 3: It uses a different compression algorithm.

The wc word count command in Linux operating system is used to find out the number of new lines, word count, byte and characters count in a file specified by the file arguments. This command is used to show previously used commands or to get information about the commands executed by a user. It is used to install new software packages, remove available software packages, upgrade existing software packages as well as upgrade the entire operating system.

This command may be used to halt, power-off or reboot a system as follows. If you want to learn more Linux commands or Linux in-depth then these are great courses for beginners:. She builds and delivers best in class content for global audiences.

View all posts by the Author. Don't have an account? Sign Up. Already have an account? Linux System Administration and Commands. Linux System Administration Tutorials. Related Tutorials AWS. Google Cloud Platform. Linux System Administration. Microsoft Azure. Recommended Learning Introduction to Linux edx. Learn the ways of Linux linuxjourney. The free command gives you a summary of the memory usage with your computer.

The -h human option is used to provide human-friendly numbers and units. Without this option, the figures are presented in bytes. The grep utility searches for lines which contain a search pattern. When we looked at the alias command, we used grep to search through the output of another program, ps.

The grep command can also search the contents of files. The output lists the name of the file and shows the lines that match. The matching text is highlighted. The functionality and sheer usefulness of grep definitely warrants you checking out its man page. The gzip command compresses files.

By default, it removes the original file and leaves you with the compressed version. To retain both the original and the compressed version, use the -k keep option.

The head command gives you a listing of the first 10 lines of a file. If you want to see fewer or more lines, use the -n number option. In this example, we use head with its default of 10 lines. We then repeat the command asking for only five lines. The history command lists the commands you have previously issued on the command line.

You can repeat any of the commands from your history by typing an exclamation point! The kill command allows you to terminate a process from the command line. You need to have a good reason to do so. We can search for the shutter process and obtain its PID as follows:. The less command allows you to view files without opening an editor.

Press the Q key to quit from less. You can also pipe the output from other commands into less. To see the output from ls for a listing of your entire hard drive, use the following command:. This might be the first command the majority of Linux users meet. It lists the files and folders in the directory you specify. By default, ls looks in the current directory.

There are a great many options you can use with ls , and we strongly advise reviewing its the man page. Some common examples are presented here. To list the files and folders in the current directory with a detailed listing use the -l long option:.

The man pages are the user manual for that command. Because man uses less to display the man pages, you can use the search capabilities of less. Press q to quit the man page or press h for help. The mkdir command allows you to create new directories in the filesystem. You must provide the name of the new directory to mkdir. If the new directory is not going to be within the current directory, you must provide the path to the new directory.

If you are going to create a directory, but its parent directory does not exist, you can use the -p parents option to have mkdir create all of the required parent directories too. The mv command allows you to move files and directories from directory to directory. It also allows you to rename files. To move a file you must tell mv where the file is and where you want it to be moved to. The passwd command lets you change the password for a user.

Just type passwd to change your own password. You can also change the password of another user account, but you must use sudo. You will be asked to enter the new password twice.

The ping command lets you verify that you have network connectivity with another network device. It is commonly used to help troubleshoot networking issues.

To use ping , provide the IP address or machine name of the other device. To ask ping to run for a specific number of ping attempts, use the -c count option.

The ps command lists running processes. Using ps without any options causes it to list the processes running in the current shell. To see all the processes related to a particular user, use the -u user option. This is likely to be a long list, so for convenience pipe it through less. The shutdown command lets you shut down or reboot your Linux system.

You can also schedule a shutdown and inform any logged in users of the pending shutdown. To let the shutdown command know when you want it to shut down, you provide it with a time. Any text message you provide is broadcast to logged in users. To cancel a shutdown, use the -c cancel option. Here we have scheduled a shutdown for fifteen minutes time from now—and then changed our minds.

Use the ssh command to make a connection to a remote Linux computer and log into your account. To make a connection, you must provide your user name and the IP address or domain name of the remote computer. In this example, the user mary is logging into the computer at Once the connection is established, she is asked for her password.

The terminal can be used to accomplish all Administrative tasks. Commands are a type of sentence in which someone is being told to do something. There are three other sentence types: questions, exclamations and statements. Command sentences usually, but not always, start with an imperative bossy verb because they tell someone to do something. Explanation: who command output the details of the users who are currently logged in to the system.

The output includes username, terminal name on which they are logged in , date and time of their login etc.



0コメント

  • 1000 / 1000