From Mageia wiki
Revision as of 07:55, 6 December 2018 by Lebarhon (talk | contribs) (Lebarhon moved page How to do some easy commands to Archive:How to do some easy commands: old and useless)
Jump to: navigation, search
this page is a draft.
It requires improvements. If you want to improve it, simply log in and click on the Edit tab.

Please remove this {{Draft}}template, when you're sure the page is complete and correct.


View the other draft pages, or other pages to improve and maintain.

How To DO some easy commands?

For instance, you want to know more about a command line command. Pretty-much any command or program has a manual page that explains what the command does and how to make it do what.

For instance, to read the manual on the manual command, simply type:

man man

If you want to read the manual for the command to find out how much space is left (or used up) on your computer, type:

man df

As you will see, df has all sorts of useful "switches" to make it show you things in different ways.

However, like most command line commands, the defaults are usually fine. Typing df on its own is usually good enough to tell you what you need to know.

Other commands you could try are:

ls

This "lists" the contents of the directory (folder) your command line is in. If you read the manual page for ls then you'll see that there are many options. However, the following are what you'll use most:

Command What it does
ls -al Lists everything in the folder - it's a bit like the DOS command "DIR"
ls -altr Lists everything in time order, but reversed. This puts the most recent thing in the folder at the end of the list.

You're usually looking for a file you just put or made somewhere. If you don't want to scroll all the way to the top of a long list, you usually want to use this command. To list things in proper order, just omit the "r".

There are loads of things that you can do using a command line, however, a lot of it is to do with administration or performing tasks faster than if you use a graphical tool. For instance, you find that you need to install a program. Let's say it's a game called called "spotty". You could:

  • Open your Package Management program
  • Search for the name of the program you want to install
  • Install it.

Or you could (as root) type:

urpmi spotty

You see? Faster. Of course, you shouldn't do everything as root. It's dangerous. You could break your computer fast if you don't know what you're doing, or if you're not thinking clearly. You are flying your computer manually, with your hands on the controls, when you're root.

However. There are ways you can avoid leaving a command prompt open as root. The usual way Linux distributions do this is by having a command called "sudo" (Do as Superuser), or "Besu" (similar). Mageia uses "sudo". However, it may not be activated on your Mageia. If that is the case, follow the instructions in this page.

There are plenty of things you can achieve using the command line. How about trying some of the recipes in the Mageia Cookbook?