architct
Posts: 1
Joined: Thu Mar 06, 2014 10:56 pm

Beyond setup

Sat Mar 08, 2014 9:07 pm

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?

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Beyond setup

Sat Mar 08, 2014 11:37 pm

Google Linux commands debian
Here is one A-Z index.
http://ss64.com/bash/
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Beyond setup

Sun Mar 09, 2014 7:47 am

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.

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Beyond setup

Sun Mar 09, 2014 7:55 am

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?
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

ripat
Posts: 191
Joined: Tue Jul 31, 2012 11:51 am
Location: Belgium

Re: Beyond setup

Sun Mar 09, 2014 8:09 am

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
Using Linux command line usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Return to “Beginners”