Hello all Linux Mint Members, i am new to Linux Mint 9.
i have a couple of important question's i would like to ask you.
Sudo, seems very complexed to me, in term of loads of different commands and what they do.
how can i get started with using Sudo, in terms of using it more frequently in everyday task??
what can be done through Sudo??
please try not to go too much into detail just keep it simple.
apologises for these horrible question's but i am interested in learning Sudo and benefits from using it.
Thanks everyone,
sorry to be a pain.
Zeuss
Getting started with SUDO
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Getting started with SUDO
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- tdockery97
- Level 14
- Posts: 5058
- Joined: Sun Jan 10, 2010 8:54 am
- Location: Mt. Angel, Oregon
Re: Getting started with SUDO
Hi zeussrapidfire, welcome to Mint. If you are interested in using the terminal, there is a site that covers it in great depth: http://linuxcommand.org/index.php
May be more than you wish to know, but good to skim through if you are looking for commands for certain situations.
May be more than you wish to know, but good to skim through if you are looking for commands for certain situations.
Mint Cinnamon 20.1
Re: Getting started with SUDO
Thank you tdockery,
can you use SUDO tdockery??
Regards
Zeuss
can you use SUDO tdockery??
Regards
Zeuss
Re: Getting started with SUDO
Ok I'll do my best to keep it simple. sudo is used to give you administrator rights. In Windows you are running as an administrator by default. In Linux you are not. So you can't just type in any old command in Linux, and expect it to work, because it may require administrator privileges. This is where sudo comes in. When you add sudo before a command it runs it with administrator privileges. Let's take a look at an example:zeussrapidfire wrote:please try not to go too much into detail just keep it simple.
Code: Select all
lantesh@lantesh-desktop ~ $ sudo gedit /etc/apt/sources.list
[sudo] password for lantesh:
Re: Getting started with SUDO
The command "sudo" allows you to execute a command as the "superuser". This means you can run applications and programs that you normally would not be able to run as a normal user. You only use it when necessary.
Re: Getting started with SUDO
Thank you guys so much for explaining and providing with me websites to get me started.Lantesh wrote:Ok I'll do my best to keep it simple. sudo is used to give you administrator rights. In Windows you are running as an administrator by default. In Linux you are not. So you can't just type in any old command in Linux, and expect it to work, because it may require administrator privileges. This is where sudo comes in. When you add sudo before a command it runs it with administrator privileges. Let's take a look at an example:zeussrapidfire wrote:please try not to go too much into detail just keep it simple.
In this example I want to use the program gedit to edit my sources.list file. So the command is gedit followed by the location and name of the file I want to edit. I've added sudo in front of the command to get administrator rights, and that is because this is a protected system file. In response the system prompts me for my password. I enter my password, and the command is executed.Code: Select all
lantesh@lantesh-desktop ~ $ sudo gedit /etc/apt/sources.list [sudo] password for lantesh:
why isn't the user allowed administrator rights by default, i know window's is an completely different operating system to linux but just curious why it isn't??
is this to provide better security within the operating system, less chance of viruses and hacker's being able to access personally files??
Thank you
Lantesh
Re: Getting started with SUDO
You answered your own question. Yes its for security. It's much harder for a virus or malware to infect a system that it can't gain rights to. I'm sure Microsoft would be using this model too now if they could, but its too late for them. Third party vendors have been writing their PC software programs for Windows now for so many years assuming they have administrator rights that many programs can't run without them. By comparison Linux software programmers have always known that their programs don't have this privilege by default.zeussrapidfire wrote:why isn't the user allowed administrator rights by default, i know window's is an completely different operating system to linux but just curious why it isn't??
is this to provide better security within the operating system, less chance of viruses and hacker's being able to access personally files??
Re: Getting started with SUDO
Fantastic,
things are a lot clearer as i have been an windows user for a long time and used to commands in CMD or DOS,
thank you both for everything, most appreciated.
take care.
Zeuss
things are a lot clearer as i have been an windows user for a long time and used to commands in CMD or DOS,
thank you both for everything, most appreciated.
take care.
Zeuss
Re: Getting started with SUDO
Zeuss, as you have figured out already, sudo is just one of hundreds of *nix commands that can be issued at the terminal command line (plus, you can combine them in shell scripts to create your own commands). Possibly of greater interest is why, if you can choose (you can) you should choose to use sudo instead of su.
Here's a good article (and following discussion): http://www.tuxmagazine.com/node/1000148
I used su instead of sudo for years before my eyes were opened. I'm lucky I never shot myself in the foot.
However, a friend once did this while logged in as root, in /dev: rm *
Trust me, you really don't want to do this unless you have a restorable system image.
Here's a good article (and following discussion): http://www.tuxmagazine.com/node/1000148
I used su instead of sudo for years before my eyes were opened. I'm lucky I never shot myself in the foot.
However, a friend once did this while logged in as root, in /dev: rm *
Trust me, you really don't want to do this unless you have a restorable system image.