CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    24

    Newbie Question: How do I get started programming in Linux?

    I've been given an assignment for school, and we were supposed to set up a virtual machine and install Arch Linux to do our programming assignments. I seem to have successfully installed Arch Linux and am able to log in as a 'root'. All I am presented with is a terminal, which, I'm assuming, is enough to get started.

    I've only used Ubuntu a handful of times, so only having the terminal is a bit scary for me, and basically I need someone to point me in the right direction as to how I go from logging in as only the root to writing a program that replicates files (the programming part I should be able to do, I just have no idea how to get started with only a terminal).

    Thanks in advance.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Newbie Question: How do I get started programming in Linux?

    Don't log in as root. Create a user account and log in under that instead. No, I'm not sure how.

    You'll need a text editor and a compiler. Gcc is the most common compiler for linux; it's probably preinstalled. Type "gcc" to check whether it's on there.

    I suggest emacs as a text editor. Some prefer vi, but I find that has a much steeper learning curve.

  3. #3
    Join Date
    Nov 2009
    Posts
    24

    Re: Newbie Question: How do I get started programming in Linux?

    Thanks for your reply. I typed gcc and it said "-bash: gcc: command not found". I'm not sure how to install it.

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Newbie Question: How do I get started programming in Linux?

    Hmm....do you have yum or another package manager?

  5. #5
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Newbie Question: How do I get started programming in Linux?

    On Arch Linux site I found some info regarding the package manager http://wiki.archlinux.org/index.php/...ading_packages

    To install gcc you probably type pacman -Ss gcc to search for available gcc versions and then pacman -S gccXXX to install the selected version. To add a non-root user you type adduser username
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured