Basic Linux Commands:
Once you have a terminal window that displays the Linux command line prompt, you can start to checkout the files that have been installed.
From this prompt, you can explore all the files on the system using linux commands:
cat - (msdos: type) - types the contents of a file to the screen
cat /proc/version – shows you the version of linux you have
cd - (msdos: CD) - change directory to the named directory or path (prompt changes too)
cd / - change directory to the root
cd … - change directory back one
date - (msdos: date / time) - shows it is 1970 all over again
df - (msdos: chkdsk) - shows the size of the ramdisk
ls - (msdos: DIR) - listing of the files, some fun arguments:
ls -al - list hidden files and shows file information
ls -alR – list files recursively
g r e p - (msdos: find) - finds a string within a file
as in g r e p “html” index.html
m k d i r - (msdos:m k d i r) - creates a directory fourm
(won’t let me spell these without spaces, ignore the spaces)
more - (msdos: more) - shows a long file one page at a time
-
shows the next page
-
q – stops the listing so you don’t have to see it all
rm - (msdos: del) - removes a file
rmdir - (msdos: rmdir) - removes a directory
vi - (msdos edit) - worlds oldest (?) and ummm… easiest ported editor
type “i” to get into insert mode
press “esc” to get back into command mode
press “:wq” to write and quit
press “:q!” to quit without saving
ps - - shows all the various programs running (we are multitasking!)
jobs - - shows any programs you might have started
fg – brings a stopped job to the forground
reboot - shuts 'er down and starts’er back up again
set - (msdos: set) - shows our environment variables (like the current PATH)
uptime - length of time system has been running
Note: pressing the up-arrow key from the shell prompt will scroll through the commands you have typed on the prompt. Pressing the tab key will auto-magically fill out a filename or command. Sometimes, command followed by -help will display some help information (but not always!)
Help for commands found here:
http://man-wiki.net/index.php/1:busybox#COMMANDS
Commands can also be combined on the command line:
~# ls -l | more
This “pipes” the results of the ls command into the more program, which will pause after each screen full of stuff (so now you can see the first files in your directory too!).
========
Let me know if I missed any of your favorite commands !