Welcome to the Linux Foundation Forum!

Switching Over and Mastering

Hello. I have been fascinated by Linux and more specifically Ubuntu for quite some time now. I have been thinking about switching from Windows for a couple years but, have been very hesitant because I know nothing about the terminal language and the real in's and out's. That being said, I would like to know how you mastered linux and what do you think is the fastest way and/or best way for me to do the same.

Also, I have just put together a sort of "bare bones" kit if you will with a dual core 1.6 Ghz processor and the Nvidia ION chipset. If you want to see what it is here is a link: Link to see what I am working with. I am going to be making it a file server and a kind of media server as well. What do you recommend and why?

Comments

  • mfillpot
    mfillpot Posts: 2,177
    I learned Linux based systems a little differently. In 2003 i decided that I should learn it, so I removed windows completely and installed Slackware. With no fallback options i became familiar worth three system within a couple of months.

    As for your server i agree with robin, try some live cds to confirm hardware compatibility.
  • woboyle
    woboyle Posts: 501
    Most services are available in GUI form accessible from your Ubuntu desktop. There are many times when things are easier to do from a command line. The shell program that Ubuntu (and most Linux systems) use by default is called bash, short for "Bourne Again SHell". A popular (and one of the first) Unix shell programs was written by Bourne (not Jason :-)). The open source version that was written to be 100% compatible with the Bourne shell is bash. So, get the Nutshell book on bash programming, or I think there is a Bash Programming For Dummies available as well. In any case, several are out there that you can order from or buy at Amazon.com, Borders, Barnes and Noble, et al.
  • Limpalot
    Limpalot Posts: 2
    How did I master Linux?
    By
    while [ 1 -lt 2 ]; do
    fiddling with it, breaking it, trying to fix it, swearing at it, reinstalling it.
    done

    I don't think there is another way ;) and since 1 is STILL less than (-lt) 2 I'm still at it after 11 or 12 years, although the swearing and reinstalling part is very seldom in the loop anymore...
    Just make sure you have all the data on its own partition, I use the /home partition for shared stuff in addition to the home dirs, it makes it easy to partition (/home as big as you can) and it makes it easy to reinstall without loosing data (just not format /home during install, just mount it).

    I was so tired of reinstalling at one point (I think I was running RedHat 6.2) that I made an extra partition for a small install and a compressed image of my /root partition.
    (dd if=/dev/sda2 |gzip > root.img.gz)
    I then made a script to run dd from the image back on my main /root partition, so when I had broken my install beyond (my ability) to repair I just booted from the other partition, ran the dd-script and was back up and running.
    Yes I know there are more elegant ways of doing this, but I learned a lot ;)

    So my advice would be to just try, start out with Ubuntu or Debian (my preference) and use the forums, there's usually a bunch of helpful people there :)
    Oh, and don't be afraid of using bash, it's not THAT hard once you've started with it and it's a great tool!
    Even though you have graphical frontends for most everything now the config is still in text-files, so being able to browse them and edit them is, while not a must, an advantage if you want to understand your system.
    Good luck...
  • jabirali
    jabirali Posts: 157
    The first step is to recognize that, contrary to popular belief, the command line is not an arcane "hack". All the commands available were created by other people with the express intent of providing an easy and efficient interface to your computer.

    Although it's a different path than I used myself, I think I would recommend this this approach to learning the command line:
    1. Learn to do basic file management from the terminal.[ul][li]pwd - Print Working Directory[/li][li]cd /path/to/directory - Change Directory[/li][li]ls - List the files and folders in the current directory[/li][li]mv /path/to/file1 /path/to/file2 - Move or rename a file[/li][li]cp /path/to/file1 /path/to/file2 - Copy a file[/li][li]rm /path/to/file - Remove a file[/li][li]mkdir /path/dirname - Make a new directory[/li][li]rmdir /path/dirname - Remove a directory[/li][li]rm -r /path/dirname - Recursively remove a directory, with all its contents[/li][li]touch /path/to/file - Create an empty file[/li][li]chown username:groupname /path/to/file - Change Owner of a file[/li][li]chmod rwxrwxrwx /path/to/file - Change the rights to a file. The three sets of rwx denotes the access rights of, respectively, the file owner, the group, and everyone else. Replace a letter with a dash (-) to remove that access right, e.g. rwxr-xr-x gives full access to the owner and read/execute rights to everyone else.[/li][/ul]
    2. Learn basic text manipulation[ul][li]cat /path/to/file - Print the contents of a file in the terminal[/li][li]less /path/to/file - Show the contents of a file in the terminal. Allows you to use the arrow keys and page up/page down to navigate in the file. Use forward slash to search (/pattern<ENTER>), the press N to jump to next search result and Shift-N to go to previous hit, and use the button Q to quit.[/li][li]grep 'some pattern' /path/to/file - Show all lines in a file that contains a text pattern. Use the character '^' to indicate the beginning of a line, and '$' to indicate the end of a line; so the pattern '^text$' will match lines that contain nothing but 'text'.[/li][li]grep -v 'some pattern' /path/to/file - Show all lines that do not contain some pattern.[/li][li]sed 's/old pattern/new pattern/g' /path/to/file - Show the contents of a file, but substitute all occurences of 'old pattern' with 'new pattern' first.[/li][li]echo 'some text' - Print some text in the terminal[/li][li]nano -w /path/to/file - Use a user-friendly command line text editor to edit a text file.[/li][li]wc -l /path/to/file - Count the number of lines in a file[/li][li]sort /path/to/file - Sort the lines in a file alphanumerically[/li][/ul]
    3. Learn to do package management from the command line[ul][li]apt-cache search pattern - search for a package named pattern[/li][li]sudo apt-get install packagename - install a package[/li][li]sudo apt-get remove packagename - uninstall a package[/li][li]sudo apt-get autoremove - uninstall unneeded dependencies[/li][li]sudo apt-get clean - clean the cache of downloaded packages[/li][li]sudo dpkg -i /path/to/package.deb - install a manually downloaded .deb package[/li][/ul]
    4. Learn to use shell redirection. This is were the real power of the UNIX command line comes from; you can redirect the output of one command as the input of a new command, linking several commands together in a digital production chain.[ul][li]command_1 | command_2 - Send output from one command as input to a new command[/li][li]command > /path/to/file - Write the output of a command to a file, overwriting the file in the process.[/li][li]command >> /path/to/file - Append the output of a command to the end of an existing file.[/li][/ul]A couple of practical examples:[ul][li]apt-cache search web | less - Search for packages related to web, and navigate the list of results using the command less.[/li][li]apt-cache search mozilla | grep -v firefox > results.txt - search for packages related to "mozilla", but remove all entries in the list related to "firefox" - and finally save the results as results.txt[/li][li]cat /path/to/file | sed 's/old/new/' > /path/to/file - Replace all occurences of the pattern old with new in a file.[/li][li]echo "This is some text" >> /path/to/file - Append text to a file[/li][li]cat /path/to/file | grep -v '^#' > /path/to/file - Remove all lines in a file beginning with the sign #[/li][/ul]

    5. Now that you know many useful commands, put them in a script to automate tasks from the command line - and glue them together with logical operators and test constructs. Google it when you get here ;)

    6. Whenever you're unsure of how to use a command, try running man command to check the system manual for that command. If that doesn't help, try googling for guides ;)

    There are of course many more commands you should learn with time, like ps, kill and mount - but I recommend starting with the ones above.

    I hope this helps. And yes, I had a lot of spare time today ;)

Categories

Upcoming Training