Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

? asked in Computers & InternetSoftware · 7 years ago

What does the command "sudo du" do in Linux?

I accidentally typed this instead of "sudo su" and got some crazy output... what did I just do!?!

8 Answers

Relevance
  • Ash
    Lv 6
    7 years ago
    Favorite Answer

    The du (i.e., disk usage) command reports the sizes of directory trees inclusive of all of their contents and the sizes of individual files. This makes it useful for tracking down space hogs, i.e., directories and files that consume large or excessive amounts of space on a hard disk drive (HDD) or other storage media.

    So relax you just executed the du command as a root user. Nothing went wrong.

  • ?
    Lv 4
    4 years ago

    Du Linux Command

  • 7 years ago

    Neerp is mistaken about the use of sudo and root accounts in "the real world". Direct root login may be accepted in a very small business, but not in any business of size.

    In an enterprise setting very close attention is paid to who has root access (through a tool like sudo, with logging of the actual user account) on each system, and who among those has accessed a system at any particular time. What changes were made and which files were accessed is tracked carefully. Accounts are NEVER shared, especially not root. Non compliance is grounds for dismissal from employment.

    System administrators have access only to those systems where it is needed for them to do their work. A network engineer does not have access to any equipment other than routers, switches, and possibly firewalls and load balancers (depending on the organization). DBAs only have access to the databases they maintain, not to root privileges on the database servers. Financial servers are off limits to web server sys admins, etc. In general, both routing and who has administrative access is tightly controlled between departments.

    And for organizations involved with medical records, financial services, international commerce (tariffs, trade restrictions, etc.), and other services which operate under government regulations, things get serious.

  • Neerp
    Lv 7
    7 years ago

    I agree with Plugh. I converted all of our severs from Ubuntu to Slackware, and several problems we were having went away. Ubuntu is linux for the masses, but really isn't that well suited for the professional or server usage.

    Because Ubuntu is for the unskilled computer user, the root account is kept away from them as much as possible. They have to use sudo to run commands with root privileges. But in the real world, we don't use sudo, we just use the root account when it is needed. The difference is in your level of skill and training and experience. Ubuntu users tend to be on the bottom of the technical skill food chain, and giving them root access can be dangerous. The seasoned pro needs root access, and we just use the root account when needed.

  • How do you think about the answers? You can sign in to vote the answer.
  • Anonymous
    6 years ago

    This Site Might Help You.

    RE:

    What does the command "sudo du" do in Linux?

    I accidentally typed this instead of "sudo su" and got some crazy output... what did I just do!?!

    Source(s): command quot sudo du quot linux: https://biturl.im/Qr5Zh
  • Anonymous
    5 years ago

    You need to use the visudo command when logged in as root. Visudo drops you into the vi editor with access to the /etc/sudoers config file. Then you just add the users you want to have access to sudo using the format (one user per line): username ALL=(ALL) ALL

  • Marvin
    Lv 7
    7 years ago

    Ash is correct about su. However be careful about sudo. I can tell you are an Ubuntu user. In the professional world sudu is seldom used, but it is a standard in Ubuntu. If you get a job do not expect to be using Ubuntu.

    Source(s): Linux professional
  • Anonymous
    5 years ago

    I am very interested about the answer to this

Still have questions? Get your answers by asking now.