Page 10 of 12 FirstFirst ... 89101112 LastLast
Results 91 to 100 of 117

Thread: NEW UBUNTU USERS: Becoming friends with the terminal...

  1. #91
    Join Date
    Apr 2008
    Location
    RiceMonsterland, Canada
    Beans
    Hidden!

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    woa, old thread

    Quote Originally Posted by alejo_3280 View Post
    Oh, one question. Does the "sudo rm -rf /" command erase EVERYTHING from your PC?
    Yes, even any devices such as usb drives will lose everything.

    For example, if I enter "sudo rm -rf /home/music" (don't remember the location of the folder, but you get the point), does it erase everything from root to music, or just music?
    rm -rf /home/user_id/music will only delete everything in music. rm -rf / deletes EVERYTHING. This is because Linux mounts everything under the root directory, which is /. rm will only delete the file path you specified, not everything below it.
    Code:
    while true; do echo -n "RiceMonster "; done
    Best thread ever

  2. #92
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    'sudo rm -rf /' will not do anything. There are measures in place to prevent that from happening. Now, if you start to specify folders within / you'll run into problems, but that's another story. As for 'sudo rm -rf /home/*username*/music' (which I assume is what you meant), no, it will not erase your entire folder. You wouldn't use 'sudo' or the -f switch anyways, because your user owns the folder. The -r switch recursively erases _up to_ the folder you specify - ie, if you enter 'rm -r ~/music', it will erase /music (in your user's directory, that is what ~ means) and everything below it.


    Edit:
    Quote Originally Posted by RiceMonster
    rm -rf / deletes EVERYTHING.
    No it does not. Please see this post from this thread.
    Last edited by .Maleficus.; June 24th, 2009 at 05:00 PM.
    arch 2008.06
    Intel Core 2 Extreme QX6850 | Asus Maximus II Formula | EVGA 8800GT Superclocked | 4GB G.Skill DDR2-1000 | Zalman ZM600-HP

  3. #93
    Join Date
    Jul 2008
    Beans
    Hidden!

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    The only Linux book I've ever purchased is "Linux Phrasebook". It's a small but thick (~350pg) reference to many terminal commands. It's also, in my opinion, the only Linux book worth purchasing. I keep it next to my desk just in case. It's not gonna give you every command you'll ever need but it's a nice resource.

  4. #94
    Join Date
    Feb 2007
    Location
    /home/paris
    Beans
    690
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    Mazza.

    nice intro.

    simple clear concise, informative.

    Others have said about the ability to run nautilus from the command line.

    Maybe an addition may be that a user can run almost any system from the terminal and hence easily catch any error messages, great for all users when trying to find out why the system isn't working.

    I have exactly that problem at the moment with cairo-dock, but can't find any info in the log files and can't start it from the CLI - it's really agravating me as the launcher for nautilus fails when I try to start it from the dock!

    Oh well, I'm sure to figure it out eventually!!!

    David.

    Ok all I found how to start nautilus from the cairo dock. This may work for other things also. It was simply a mater of telling nautilus what part of the directory tree to open from, try this from a terminal
    Code:
    nautilus ~/Desktop
    and nautilus will open on the /home/yourUserName/Desktop directory.
    Last edited by theDaveTheRave; July 27th, 2009 at 01:07 PM. Reason: solution to starting nautilus from cairo-dock
    Eee pc via Wubi install.
    evertying works straight out of the box

    My Launchpad page

  5. #95
    Join Date
    Dec 2005
    Location
    What a weird trip.....
    Beans
    4,678
    Distro
    Ubuntu 12.04 Precise Pangolin

    Cool Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    I'm sure someone already posted this, but all you have to do is highlight the passage or phrase that you want to copy. No need for Ctrl+c or right click and copy.

    Once highlighted, just press the middle mouse button. It will paste whatever you just highlighted.
    If at first you don't succeed - just buy the company and tell them to make the one you want.

  6. #96
    Join Date
    Feb 2007
    Location
    /home/paris
    Beans
    690
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    Quote Originally Posted by steveneddy View Post
    I'm sure someone already posted this, but all you have to do is highlight the passage or phrase that you want to copy. No need for Ctrl+c or right click and copy.

    Once highlighted, just press the middle mouse button. It will paste whatever you just highlighted.
    A similar thing is possible from a laptop where you don't neccessarily have a mouse connected, by using Ctrl-Shift-c and
    Ctrl-****-v - depending on if you want to copy from or into the terminal.

    again most usefull. Once you get used to this you will find windows highly annoying for not having it!

    David
    Eee pc via Wubi install.
    evertying works straight out of the box

    My Launchpad page

  7. #97
    Join Date
    Nov 2009
    Location
    Hollywood,MD
    Beans
    4
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    Thanks For The Guide...Being Absolutely New.....It's Good To Know About Something And I Have All The Respect You Told The True Meaning Of The "10 Character Devil Command"I Had Red Hat Once Then Went Back To Windows Cause I Didn't Have The Time To Learn It. But Finding Ubuntu A Bit Easier To Pick Up This Time And Learn. With Good People On The Forum Like Yourself.....Noob's Such As I Will Have A Good Source Of Info.

  8. #98
    Join Date
    Oct 2010
    Beans
    1

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    Quote Originally Posted by Mazza558 View Post
    For all the new people, just starting out on Ubuntu, if you're wondering why the people here tend to solve your problems using code rather than giving you directions, this short guide is for you.

    PART 1: What's the Terminal?

    A pretty good way of describing the terminal is a window into the core of your PC. What I mean by that is, with the right knowledge, you can modify ANY aspect of Ubuntu. If you're not sure what it looks like, open a terminal window now!

    Head to Applications, then Accessories, then "Terminal".

    Looks scary? Yes, it can be. To anyone but the experienced computer users among us, the terminal can seem way out of your depth. Luckily, when using Ubuntu, you barely need to touch it unless you are having problems and need to ask for help here. In the terminal, you will see your username as text, looking slightly like the format used in an email, for example:

    Code:
    name@name-desktop$
    
    or 
    
    name@name-desktop$
    Now, you're probably thinking this is a bit archaic. In this day and age, with windows, buttons and graphics, who on earth would want to use this?

    The truth is, the terminal is, with the right frame of mind, SIMPLER to use than navigating endless menus and selections. It is simpler because it is simply a faster way of doing things. It does things automatically for you. It is a friend, not an enemy. It wants to help you, as long as you give it respect.

    PART 2: Why does it help me?

    The terminal helps you because it allows people helping you to give you a standardised code to solve your problems. This means that whatever version of Ubuntu you use, this code will, in the vast majority of cases, work fine. So, rather than helpful forum members having to tell you to click "here, here, down here, right there, here, there, where, there", the code will do the whole thing for you.

    In fact, as a normal user who just wants to use his/her computer, you don't need to understand one bit of code. The vast majority of time, it's a simple copy and paste of what may seem like garbled nonsense, but it'll do the trick. Of course, it can help if you understand some of the lingo used, but by and large, you don't necessarily have to do all that much.

    PART 3: How do I add code to the terminal from guides on Ubuntu Forums?

    It's pretty simple. Select the whole of a line of code on the page, select the code (e.g click and drag the mouse), copy it (ctrl + C is fastest, but you can also right-click and copy from there). How do you know what a line of code is like? Most guides put them in quotes or code boxes, like this:

    Code:
    Hello!
    Please note that if you see multiple lines of code at once in a guide, copy and paste them one at a time.

    Once you've copied the line of code, go to your terminal window, and, if you have a middle mouse button, you can press it with the cursor hovering over the terminal window, and it'll appear in the terminal. If you don't, press CTRL + SHIFT + V to paste it. To run that code, simply press enter.

    Okay, let's give this a test drive!

    Here's the code you need for Ubuntu to check for updates to programs.

    Code:
    sudo apt-get update
    Copy this line of code, and paste it into the terminal. Then press enter. You should see something scary. You'll get a response like:

    Code:
    [sudo] password for (your name):
    In the terminal. The terminal is simply asking for your permission to do this. It's asking if you are really you, and not some random person. Enter your password - note that it gives no recognition that you're entering anything in, so if you think you've gone wrong, hold backspace down for a few seconds and re-enter.

    Press enter once you've entered your password.

    Boom... lots of code zooming past you now. What Ubuntu is doing here is going to all the addresses of all the software you use (provided you're connected to the internet) and asking if there's a new version available. If it asks whether you want to update (it'll have a Y/N option, Y being "Yes" and N being "No"), make your choice by typing Y or N. This command actually does exactly the same thing as the Update Manager found in System > Administration, except this method shows more detail. Remember, it's entirely your choice whether you use this method or open the program - you may, in time, find this method more efficient.

    So now you know how to copy, paste and run code from guides...

    PART 4: "Sudo"? Is that a new brand of soap?

    The answer is no. You may see this often in lines of code. It is a literal abbreviation of "SUper-user DO". Still confused?

    SUDO is the way of telling lines of code that this line of code is important, because it wants to do something which modifies the system (e.g install something, remove it). By entering the password for SUDO, you are effectively giving the terminal access to your whole PC for a temporary time. Remember that it is only you who can do this, as long as only you know your password. Why do we need SUDO? Because, unlike Windows XP, which gives you access to your PC all the time, Ubuntu only gives access to those who it can trust - you. You may, from time to time, especially when opening programs in the system menu, see a popup box asking for your password. This is also SUDO but in a popup rather than in the terminal.

    PART 5: Rogue commands

    Now you have some basic knowledge of the terminal, it is very important that you understand a particularly dangerous line of code. It is very powerful (and can be useful in a minority of cases), but as they say, with great power comes great responsibility.

    The name of this infamous and legendary command is:



    Do not run this command, ever.

    I repeat - never, ever run this command, unless you absolutely know what you are doing!

    I know this seems like scaremongering, there have been a few cases in the past of malicious users posting this code for people to copy and paste, especially in "guides" which aren't really that. I'd like to take this opportunity to explain exactly what it is about this command that makes it particularly nasty. Luckily for you, if you enter this code accidentally, it will give you one last safeguard - SUDO. Remember, in this case, SUDO is a guardian. It'll ask for your permission. Make sure that if you see this code, do NOT give your password. SUDO is one of the greatest security features ever added to an OS, but it cannot protect you from your own mistakes.

    One such mistake is if you have run a command using SUDO within 15 minutes previously. Ubuntu will allow commands to be run without you having to enter your password for up to 15 minutes after entering the first SUDO command. This means that if you accidentally enter this code, SUDO won't always be there to save you!

    Okay, here's a breakdown of what this command will do to your PC. You can find this information out for yourself if you want by typing:

    Code:
    man rm
    However, for everyone else, this is what the command will do.

    SUDO: Gives the code the permission to do anything to your PC, but remember, only with your permission first.

    RM: ReMove a file or multiple files (Can you guess where this is going?)

    -R Recursive - this option will remove any subfolders as well. For example, if you did RM -R /home/bob, then any folders contained within "bob" would be deleted too.

    F (part of -RF) - Force. This means that despite any protests by the system, this command has absolute power. It WILL be run, no matter what. It will not ask for any confirmation at all either.

    / By far the most dangerous bit of the command. Whereas



    ...could be useful if bob wanted to get rid of his downloads folder for whatever reason, the "/" means EVERYTHING. every system file and folder you have. So, in summary, this command will trash Ubuntu, rendering it unusable when you restart. Note that, unbeliveably, you will still be able to use your PC until you restart - this is because everything is already loaded into memory. It is possible to recover files from your home folder by using a LiveCD, but everything else will have to be reinstalled. Not good.

    The best way to describe this nasty command is the 10-character code of death.

    _____________________


    Thanks for reading this guide - it was intended for the newest of new users, as I don't think there's much help given for people who are just starting out.
    Many thanks for the simplification. I did not realise that typing the password did not show. So obvious. However by page 7 everything started to get technical again as others became too helpful. I have just downloaded 10.10 onto my net-book along side windows xp. No wire free for some reason and no downloading from the software centre (not supported-- low power chip with PCI ID 14e4:4315!) All double Dutch to me. Is there a nice simple way to correct this. Your help would be appreciated as I am getting very frustrated with my lack of knowledge.
    bhardie

  9. #99
    Join Date
    Sep 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    I always wondered, why cant ubuntu get rid of the terminal like Mandriva?

  10. #100
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NEW UBUNTU USERS: Becoming friends with the terminal...

    Quote Originally Posted by sudoer541 View Post
    I always wondered, why cant ubuntu get rid of the terminal like Mandriva?
    You don't have to use the terminal if you don't want to.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Page 10 of 12 FirstFirst ... 89101112 LastLast

Bookmarks

Posting Permissions

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