Introduction to MAC OS X system programming and software development tutorial

Source: Internet
Author: User
Tags mkdir in python

Apple computers can not only be used to surf the internet, entertainment, design, but also to help us do a lot of things, such as Apple (Mac OS X) is a good platform for programming software development.

Here is the Mac OS X programming, software card Getting Started tutorial Apple's newest operating system Mac OS X kernel is actually UNIX (accurately said FreeBSD + Mach).

The UNIX platform is a good development platform that supports many programming languages: C, C + +, Java, Perl, Python, Ruby, Unix Shell ..... I am now installing "Tiger", the default installation, can already compile Java, Perl and other languages. If you need to write a C + + program, you need to install Xcode (on the first disk) with the installation disk.

Let's say you have a Mac OS x Apple machine, and take a step-by-step look at how to program with the simplest UNIX commands.

Open "Finder"--"applications" and "utilities" to open "terminal" inside. You'll see something like a DOS window underneath Windows.

We are on this window to start our UNIX programming journey!

1-Basic UNIX commands to start UNIX programming, the most basic UNIX commands still need to be understood.

(1) LS: View this directory file and directory information.

(2) RM: Deleting files, such as "rm a.txt", is to delete the "a.txt" file.

(3) mkdir: A new directory, such as "mkdir test", is the creation of the "Test" directory.

(4) CD: The conversion directory, such as "CD Test", is to transfer the current directory to "test".

Unix command There are many, today we will say these, you quickly in the terminal to try ~ ~

2-Decide which programming language you want to use if you are not a computer professional (or not programmed to eat), it is advisable to learn Python or Ruby. They are relatively easy to get started language, and in line with the current "object-oriented" technology trend, is very popular abroad. The famous "BT download" is written in Python. If you want to learn more about programming techniques, you can learn C or C + +, which are system-level programming languages. Using them, you can control the computer very thoroughly, but the difficulty of learning is correspondingly larger. There is the Java language, is now very popular, the difficulty is between the above two, is also a good choice.

3-Using a text editor to introduce "real" UNIX programming, so introduce you to use "vim". When the terminal knocks "vim" into the vim environment, but unlike the usual editor, using VIM requires command. Here are the general steps to use VIM:

(1) Press "I" to enter the editing state (otherwise nothing can not go in, haha:)

(2) Complete file editing

(3) Press "ESC" to exit Edit status

(4) Use ": W file name" To save the file (Just press ': ' Key, followed by ' W ' and followed by the file name to be saved)

(5) Press ": Q" to exit

4-Start programming for the sake of simplicity, let's use the Ruby programming language for an example: (1) Vim test.rb&

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.