Learning Mysql


Using the Command-Line Interface



Download 4.24 Mb.
View original pdf
Page20/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   16   17   18   19   20   21   22   23   ...   366
Learning MySQL
Using the Command-Line Interface
The three operating systems we use in this book all have graphical user interfaces you can start programs by clicking on icons, you can select tasks from menus, and you can drag and drop files and folders. However, once you start to use more powerful aspects of the operating system and applications, you’ll quickly find that some tasks are more
12 | Chapter 2:
Installing MySQL

easily done by typing in commands. For example, you can tell the operating system to list certain files in a folder or run a given program in a particular way.
Linux, Windows, and Mac OS X all have a command-line interface that allows you to do this. In Linux and Mac OS X, you use a Terminal program to show you the com- mand-line interface, which is called the shell. In Windows, you use the Command
Prompt Window program to show you the Command Prompt, sometimes called the
DOS prompt.
In this section, we’ll describe how each command-line interface works you can skip the descriptions for the operating systems you don’t use.
The Linux and Mac OS X Shell
To access the shell under Linux, open a terminal program, such as konsole
, rxvt
, or xterm these are often listed in the main menu under the System or System Tools group,
and maybe simply labeled Terminal. To access the shell under Mac OS X, open a terminal window by double-clicking on the Terminal icon in the Utilities folder under the Applications group.
Under Linux, you’ll see a prompt similar to this one:
[adam@eden while under Mac OS X, you’ll see something like this:
eden:
adam$
This shell prompt indicates what user account you’re logged in under, what computer you’re logged into, and what directory you’re working from. You’ll generally be first logged in as an ordinary user (we’ve shown the user adam hereon the computer
(eden
), and working from your home directory. The tilde (
) character is a shortcut symbol to a user’s home directory on any Unix-like system, including Linux and Mac
OS X for example, a user’s home directory could be
/home/adam
, but you can refer to it as adam
, or, if you’re logged in as adam
, simply as
. The sample prompt shows that the user adam is logged into the computer eden and working from his home directory.
To keep things simple, we’ll just show a dollar sign to indicate the Linux or Mac OS X
shell prompt, as below:
$
From the shell, you can run many useful commands we’ll see some as we progress through this book. Two standard commands that are important to know for this book are:
cd
Changes your working folder or directory on disk. For example, you can change to the
/tmp directory by typing cd /tmp

Download 4.24 Mb.

Share with your friends:
1   ...   16   17   18   19   20   21   22   23   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page