Page 1 of 1

Beyond setup

Posted: Sat Mar 08, 2014 9:07 pm
by architct
I have set up my raspberry and now would like to get started doing something. I have not been able to find any help info on how to determine what commands are available to me. In original CPM-86 there was a manual that explained what commands could be issued on the command line and any switches associated with that command. Where do I find this information and where do I go from here?

Re: Beyond setup

Posted: Sat Mar 08, 2014 11:37 pm
by klricks
Google Linux commands debian
Here is one A-Z index.
http://ss64.com/bash/

Re: Beyond setup

Posted: Sun Mar 09, 2014 7:47 am
by rpdom
Most commands are stored in /bin or /usr/bin. Each of those has a manual page associated with it. There are also other commands that are built-in to the shell (command line interpreter) that you are using in the terminal.

You can list the commands with

Code: Select all

ls /bin
# or
ls /usr/bin
There are quite a lot more than you would find in the little CPM/86 manual, which is why you don't get a printed copy any more.

To find out the switches and options available for a command you can use the "man" command.

For example to find out what the "ls" command does and what options it has

Code: Select all

man ls
LS(1)                            User Commands                           LS(1)



NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...

DESCRIPTION
       List  information  about  the FILEs (the current directory by default).
       Sort entries alphabetically if none of -cftuvSUX nor --sort  is  speci‐
       fied.
[...]
You can also look up the man pages online at http://manpages.debian.net/cgi-bin/man.cgi
When you use "sudo" to run a command with root powers you can also run any command in /sbin and /usr/sbin, so you can look in those directories too.

Re: Beyond setup

Posted: Sun Mar 09, 2014 7:55 am
by DeeJay
Coming at this from a different angle, perhaps you might find it interesting to read some of the 21 online issues of The MagPi magazine which contain details of all sorts of projects that other people have done with the RPi?

Re: Beyond setup

Posted: Sun Mar 09, 2014 8:09 am
by ripat
A very handy command when you don't remember the exact command name: apropos. It's a lookup utility for the man page summary.

Code: Select all

$ apropos disk

cfdisk (8)           - display or manipulate disk partition table
df (1)               - report file system disk space usage
drbddisk (8)         - Script to mark devices as primary and mount file systems
fdformat (8)         - low-level format a floppy disk
fdisk (8)            - manipulate disk partition table
git-count-objects (1) - Count unpacked number of objects and their disk consumption
git-credential-store (1) - helper to store credentials on disk
partx (8)            - tell the Linux kernel about the presence and numbering of on-disk partitions
sfdisk (8)           - partition table manipulator for Linux