Linux.com

aznbun

aznbun

  • Linux.com Member
  • Posts: 3
  • Member Since: 12 May 11
  • Last Logged In: 14 May 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • aznbun
    RE: superuser
    Thank you. The "./boo" worked. But I thought "./" was implied. I thought by default "./boo" = "boo". Now, I can move on to the next section. Guess I will use "./" when I am a superuser mode.
    Link to this post 13 May 11

    Thank you.

    The "./boo" worked. But I thought "./" was implied.

    I thought by default "./boo" = "boo".


    Now, I can move on to the next section. Guess I will use "./" when I am a superuser mode.

  • aznbun
    RE: superuser
    So, how do I go back to my home directory. On the command prompt is says I am at: root@ubuntu:/home/bun/bin When I "ls" in that directory I see all my files and also "boo". But when I type "boo" in the command prompt I still get: boo: command not found I am stuck, think I am missing something very simple.
    Link to this post 13 May 11

    So, how do I go back to my home directory.

    On the command prompt is says I am at:

    root@ubuntu:/home/bun/bin


    When I "ls" in that directory I see all my files and also "boo".
    But when I type "boo" in the command prompt I still get:

    boo: command not found


    I am stuck, think I am missing something very simple.

  • aznbun
    superuser
    Hi, I am new. I have a simple question. On Ubuntu, I made a script: [code]#!/bin/bash if [ "$(id -u)" = "0" ]; then echo "superuser" else echo "no" fi[/code] I called the file "boo". When I run "boo" as a regular user it says "no". But when I sudo su it, it says "boo" is not a command. So, how do I make it output "superuser". Hope this make sense.
    Link to this post 12 May 11

    Hi, I am new.

    I have a simple question.

    On Ubuntu, I made a script:

    #!/bin/bash

    if [ "$(id -u)" = "0" ]; then
    echo "superuser"

    else
    echo "no"
    fi

    I called the file "boo".

    When I run "boo" as a regular user it says "no". But when I sudo su it, it says "boo" is not a command. So, how do I make it output "superuser".

    Hope this make sense.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board