top of page
Search
lenacrawford1980

Linux apropos Command Basics: A Tutorial with 5 Examples for Beginners



I'm a little frustrated with finding "gdb examples" online that show the commands but not their output. gdb is the GNU Debugger, the standard debugger on Linux. I was reminded of the lack of example output when watching the Give me 15 minutes and I'll change your view of GDB talk by Greg Law at CppCon 2015, which, thankfully, includes output! It's well worth the 15 minutes.


The individual commands are pretty extensively documented. You can use the helpcommand to get an overview of which commands are available or to obtain detailsabout specific commands. There is also an apropos command that will search thehelp text for all commands for a particular word and dump a summary help stringfor each matching command.




Linux apropos Command Tutorial for Beginners (5 Examples)



A Linux command is a program or utility that runs on the command line. A\u00a0command line\u00a0is an interface that accepts lines of text and processes them into instructions for your computer.\nAny graphical user interface (GUI) is just an abstraction of command-line programs. For example, when you close a window by clicking on the \u201cX,\u201d there\u2019s a command running behind that action.\nA\u00a0flag\u00a0is a way we can pass options to the command you run. Most Linux commands have a help page that we can call with the flag\u00a0-h. Most of the time, flags are optional.\nAn\u00a0argument\u00a0or parameter is the\u00a0input\u00a0we give to a command so it can run properly. In most cases, the argument is a file path, but it can be anything you type in the terminal.\nYou can invoke flags using hyphens (-) and double hyphens (--), while argument execution depends on the order in which you pass them to the function.\n"},"name":"What Is a Linux Command?","@type":"Question"}]},"@context":"http:\/\/schema.org","name":"Linux","@type":["Thing"],"@id":"http:\/\/data.wordlift.io\/wl0150038\/post_tag\/linux","description":"","url":["https:\/\/kinsta.com\/blog\/tag\/linux\/"],"mainEntityOfPage":"https:\/\/kinsta.com\/blog\/tag\/linux\/","@context":"http:\/\/schema.org","name":"web development","@type":["Thing"],"@id":"http:\/\/data.wordlift.io\/wl0150038\/post_tag\/web-development","description":"","url":["https:\/\/kinsta.com\/blog\/tag\/web-development\/"],"mainEntityOfPage":"https:\/\/kinsta.com\/blog\/tag\/web-development\/","@context":"http:\/\/schema.org","name":"Tech Tips","@type":["Thing"],"@id":"http:\/\/data.wordlift.io\/wl0150038\/term\/topic\/tech_tips","description":"","mainEntityOfPage":"https:\/\/kinsta.com\/topic\/tech-tips\/"]li code,p code,.wp-block-code,.wp-block-kinsta-notice,.wp-block-kinsta-table-of-contents,.share-staticbackground-color: #f3f3f6;.related-posts background-color: #fafafa;li code,p code border-color: #f3f3f6; Skip to content Test a deployment on our modern App Hosting. For a limited time, your first $20 is on us.


If you struggle to remember Linux commands with examples and syntax, install apropos tool that searches the manual page names and descriptions. One can access basic Linux commands list using apropos. It acts as a terminal based Linux commands tutorial.


The apropos command displays a list of all topics in the man pages (i.e., the standard manual that is built into Unix-like operating systems ) that are related to the subject of a query. apropos takes its name from the English word with the same spelling (and the same pronunciation) that means relevant. It is particularly useful when searching for commands without knowing their exact names.


The following example demonstrates the output of the apropos command:$ apropos mountfree (1) - Display amount of free and used memory in the systemmklost+found (8) - create a lost+found directory on a mounted Linux second extended file systemmount (8) - mount a file systemmountpoint (1) - see if a directory is a mountpointntfsmount (8) - Read/Write userspace NTFS driver.sleep (1) - delay for a specified amount of timeswitch_root (8) - switch to another filesystem as the root of the mount tree.umount (8) - unmount file systems


ls is an example of a command which can take options: -a is an example of an option. The options change the behavior of the command. There are online manual pages that tell you which options a particular command can take, and how each option modifies the behavior of the command. (See later in this tutorial)


Pre-configured helm to describe commands, functions, variables andfaces - all in one command!. It is similar to C-h a which runsapropos-command, but interactive includes more than just commands.helm-apropos combines 5 sources:


Translations:RussianThis is a very quick-and-dirty guide meant to get you started withthe GNU Debugger, gdb, from the command line in aterminal. Often times gdb is run via an IDE, butmany people out there shun IDEs for a variety of reasons, and thistutorial is for you!


I was going through the list of files included in coreutils and I was able to come up with an example of how I could personally use all of the commands provided except for ptx. Can you give one or two (or three) examples of using ptx? The more varied the use case the better.


Even though some folks think that info pages are unnecessarily complicated to navigate, it is worth getting acquainted with them. Even though they are more difficult to navigate than man pages, they are (usually) easier to understand. Once you get the hang of moving around in them, you can go very fast and find information quickly. Info pages often contain more information than man pages, and they sometimes include tutorials and extensive examples.


Take the example of ifconfig command. This deprecated command was used for getting Ip address and other network interface information. Older tutorials on the web still mention using this command but you cannot use it anymore in newer Linux versions. It has been replaced by the ip tool.


This is my SuperMongo tutorial and help page. I will attempt to coveronly the basic plotting commands of SM, but it should be enough to getyou well on your merry SM way. SM is not hard to learn oruse. However, it can be a little rough at first, simply because youhave to learn quite a few commands before you can actually getanything done. Just be patient, and don't feel like you have tocompletely understand everything on this page the first time. A lotof it is optional (some of it I did not learn until years after Istarted), but you will want to use it eventually. Feel free to email withquestions/comments/corrections.


I will certainly not cover everything SM is capable of. It can dolots and lots of analysis and programming type things, but you willhave to find info on that elsewhere. I am just going to cover basicplotting commands. For more info type help command orapropos keyword in SM. Also, here are some great sites forSM help (these are the sites that I learned SM from!):TheJoy of Supermongo - The VERY BEST SM site there is.Supermongo help - Brief but useful descriptions of a few common commands.SM - Tableof Contents - This is the "official" SM page, but it is onlymarginally useful. Most helpful is the listing of commands, which youcan also get by typing help in SM. The listhere is NOT complete by a long shot, but you will still findinteresting stuff. If you know where tofind a complete list of SM commands (and built-in macros), please letme know.


quit: This a very useful command indeed that lets you exitSM. I have often found that the exit command is something tutorialstend to forget, and when learning a new program, I am forced to juststart trying every conceivable variant of 'quit', 'Quit', 'QUIT', 'exit','logout', etc. until I find the magic word that lets me the hellout. 2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page