With Ubuntu 18.04 LTS is installed and access configure, it is time to administrate it, using the command line interface. This means typing, lots of typing. Historically the Command Line Interfeace itself dates back to the era of Bell Bottoms pants and Teletype machines. As computers and software evolved one interface lead to another, which lead to another. Today Linux uses Bash (Bourune Again Shell), who's beta release happened in 1989 for UNIX, predating Linux's own birth by 2 years.
However powerful, using Bash or any CLI is not forgiving of mistakes. There is a premise of Garbage In/Garbage Out, where if you don't use the correct spelled, cased, or syntax for the commands you will not get the desired output.. At worst messing up a command will delete files, destroying data or damaging the operating system.. Hopefully you just get a message that the command isn't recognized or that the package associated with it isn't installed.. With great power is great responsibility, if you make a major mistake it could be a resume generating event.
Giving Yourself Superuser Powers
sudo
The most important commands to remember is "sudo" if you need to do almost anything important, chances are you will need to use it. Sudo is must be added before any command that requires Super User (or commonly called "root") permission, and requires the password of the use who issued the account. Ubuntu does not even assign a password for the root account for security reasons. To do anything that requires Super User permission, you must use sudo. Before the command runs you will be asked to provide the password for the users you are logged in with.Notice the first attempt to run the command "apt update" the it runs into permission denied for it's operations, but with "sudo apt update" it runs fine.
Builtin Help and Manual
No normal human is able to memorize every command's options and arguments. Back in the 20th century, users relied upon printed manuals that came with your computer or came in the Retail Box of your Operating Systems. Normally you keep within arm's reach of the user, even if you didn't need it very often. If you went to early university computer labs, each terminal or micro computer likely had a binder with some form of documentation for users to reference.The User and Reference Guide that came with MS-DOS 5.0 in 1991, the same year Linux Torvolds. announced his little project. on Usenet. |
--help
Bash commands allow for great amount of control of the command, with option and arguments that generally are used in this format:
Command [option] <argument>
Every command has a "--help" option which lists options describing their use and any arguments they would require, this is intended to be a quick reference.
The output of running "apt --help" |
man
While the --help outputs basic command usage, Ubuntu has a manual for every command, often referred to as the "man page" or just "man". It is accessed with the "man" command followed by the command you want to read about' for example "man apt"
First page of the man for apt. |
If would rather read them in a browser they can be found at https://manpages.ubuntu.com/manpages/bionic/. Note, each release has it's own set of man pages, 18.04 is named bionic beaver and it's man's are in the /bionic directory, other version of Ubuntu have their own directory. Desktop and Server versions use the same man pages.
No comments:
Post a Comment