Meaning of Square brackets [ ] , Angular brackets < > in Ubuntu Linux Systems

1. What do the square brackets [ ] mean in an ubuntu terminal command's synopsis?

May be you have seen the various symbols in the manual pages of the command while accessing the man page, like this [ ] which is called as square brackets. Please look into the square bracket first :

[ ] square bracket is nothing just an optionally, Things inside the square brackets are optional.

[-a] option above means that the while writing the which command, there is no compulsion to pass argument that is -a. Means [-a] is optional as the -a is written in square bracket

$ which -a date

Alternatively, you can use the following command (without using -a, as it is optional)

$ which date

This is how the use of square brackets [ ] in Ubuntu can be considered as, But careful the next command with the square brackets is going to be something surprising,

square brackets containing pipe-separated items [ … | … ]  mean that you must specify one of those items. for example for the below mentioned command you are supposed to use either of the both argument a or f , you must specify one of the both, but not both like -af

$ which [-a | -f] cal                              /* you must use either -a or -f but not both like -af */

2. What do the angular brackets < > mean in an ubuntu terminal command's synopsis?

You may have come across while using the ubuntu systems and  the various symbols like this < > which is called as angular brackets, which is nothing just a mandatory symbol. Anything inside the angular bracket < > is mandatory 

<FILENAME>  is mandatory to execute the command. In order to execute the which command, it is mandatory to pass the filename.

$ which date

To sum up, Anything inside square brackets [ ] is optional and anything inside the < > bracket is mandatory That’s all folks for the day !! , Happy Ubuntu days Ahead !

Leave a Reply