Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How do I gain Full Permission to do things. I realize that you can really screw up a System like this but I Will be Extremely careful.
(1) when I try to do a simple Drag & Drop of a Gotmail.wav to
/usr/share/sounds............It says Access Denied. !!!!
I want to be able to do this & other commands all the time.
Please explain in detail............I do have my system Backed up!!!!
Please E-Mail me & answer here
Restricting regular users to the home directory not only protects the system from the users but also protects the system from malicious code. So operating as a regular user is really a good idea. Like Pixellany said, you can operate as a superuser and do anything by using the su command. But you should only do that when you really need to, not all the time.
There are plenty of material on the net about file permissions..Plz read some.
Also remember ls -l command will give you the owner of the dir and the group of the owner. It lists out explicitly the read, write and execute permissions for user, group and everyone to that dir.
So if in your case you are say user u1 and belong to group g1, then if the dir /usr/share/sounds is owned i.e created by u1 there will be no problem in doing what you intend to do.
IF however, let's say user u2 created it and he is not part of your group g1 then if the dir has everyone section as r-x or r-- i.e if it has the w bit turned off then that is a problem.
You can become part of his group to resolve it or he may set the everyone section of dir to rwx
plz send output of ls -l command to help you better. also send the user and group details.
hope this helps
First, I am the only user.......no others
Second, I know how to open Terminal, but not what commands to type in.!!!!!
Third, Can you type in here the commands so that I can copy & paste & even when I close Terminal window & or Re-boot that I will still have root & administrative control.
Linux is - by definition - a multiuser system, so there is the possibility to have different users configured. For everyday work, it's useful to have a personal user to use the system.
You *can* have control all the time by working as "root" (the system's superuser), but it's not wise or sensible to do that all the time! If you need to change or configure something on the system, then be root (using the command su) or use the command sudo in front of all commands you issue on the command line.
Again: It's really, really a bad idea to be root at all times since if your system is (for one reason or another) unsafe, you'll lose it to all intruders immediately. If you're online a lot, don't be root!
"distrowatch" no not a distro - please set your disto in your profile to the name of he distribution you use. Common/popular distros include Fedora, Ubuntu, SuSE, Mandriva, and many others. If you provide this information people will be able to help you more easily, giving more precise information.
It is also helpful to know which desktop environment you use. The two most common ones are Gnome and and KDE. Please tell us which one you use. Typical Gnome configurations have you starting programs from an "Applications" menu (with a text label), where as KDE typically has a "K" button which is used to start applications.
What you can do is set up a launcher (an icon on your panel) which will open a file manager program with root access. This way, you can use the normal file manager most of the time, but you can use this if you really need to. When you launch it you will be prompted for your root password.
If you tell us which distro and desktop environment you use, we can tell you how to set this up. Some distros may even have an option like this in the application menus already.
I have Kubuntu 7.04 Feisty Fawn.
OK, I understand that being in control of Root always can be vulnerable.
Tell me what commands to type in Terminal to allow me to do whatever,and then,
what commands [B][/to type in to give control back to the Operating System.]
With (K)Ubuntu, this is actually very easy: if you type in sudo before the command you want to use, the command is executed as if you were root, but you're still in your state of normal user - or to put it in another way: after the command is executed, you don't stay root. *buntu handles this very gracefully - while some argue that this is not the most secure way, it's certainly thoughtful. In fact, they even disable the root account (it's easy to set up, but you needn't). sudo is your way to full control only (and really only) when you need it, and it's already there.
OK first choose what graphical file manager you want to use. I would recommend using Thunar rather than konqueror, as konqueror starts a lot of background processes which are a security risk, and chew up system resources (a bunch of KDE daemons). Thunar also has a natty little warning telling you that the window you are using is running as root and that you may damage your system. This is more than just a security warning... if you create files in your home directory as root, only root will be able to modify them, so you should not use root to modify your personal files. Use adept or synaptic to install Thunar first.
To test it out, press Alt-F2 to bring up a run dialog and enter this:
You will be prompted for your sudo password and then you will get a Thunar instance running as root. If that works to your satisfaction, you can create a menu item using that command and then drag it to the panel or desktop as you see fit.
The terminal way to copy files:
Open a konqueror terminal emulator.
To copy the file example.txt to the name example2.txt, you would use the command:
cp example.txt example2.txt
You can copy multiple files to a directory and a lot more. Use the command "man cp" for the documentation on the command.
Any shell command you can run as your nornal user can be run as root using:
sudo cp example.txt example3.txt
Note that the resulting file will be owned by root, meaning your normal user will not be able to edit it.
I would recommend you find and carefully read an introduction to file permissions on unix-like systems. It's not so complicated, and will sav you a lot of frustration if you understand it now. Terms and concepts you should understand:
File owner and group identifier
Permission categories: user, group, other
Permission types: read, write, execute - especially the differences in meanings for files and directories
Advanced stuff includes the sticky bit, suid, octal permissions
ACLs (not usually implemented on Desktop-targeted distros)
Helpful manual pages to browse: chmod, chown, chgrp.
A clarification: sudo lets you run a command with root permissions from within a terminal window. kdesu lets you run commands a little like with sudo, but displays a graphical dialog box to get your password.
Yes, But [B][What do I do after I type in SUDO? And, Do I Leave terminal window oppen & then do my task. And, when I complete my task..........and close terminal window doe's control revert back to the Operating System???????/B] Right now all I want to do is drop a gotmail.wav.........into /usr/share/sounds.
Basically, I am just trying to be notified that I have mail without opening up my mail program KDE (KONTACT).
Hm... I'm not sure if you understand how LinuxQuestions (or any support community, for that matter) works. Learning's something you must do yourself! You've been given lots of useful information, yet you're still not willing to take things into your own hands. I don't think it's sensible to expect hands-holding all the way through! That won't take you anywhere. Furthermore, you're just repeating a tiny request while you have been given much more thorough advice - I'm sorry to say this, but this almost appears rude! Please be patient with the issue at hand as well as with yourself, but get going!
You wanted to know about sudo - it's already explained (twice, and from different perspectives), and furthermore there has been more information added about kdesu, a tool that's there waiting for you to use it. It's a great piece of help matthewg42 gave you there, please make use of it! And as for all the others, they only tried to make you move - you have to if you want to achieve something.
As for your request: The cp command has been explained (shortly, but correctly), the details on it and a whole lot other commands are a (clickable) link and some minutes of careful reading away. Combined with sudo, it solves your problem - well, almost; you'll have to find out things about chmod, too. Please, don't expect us to solve such tiny problems for you entirely - people around here love to help, but you'll have to do things yourself if you want to be really able to handle your system on the long run. What people are trying here is help you really learn that stuff!
btw: There are lots of interesting tools to get mail notification... But we're not there yet.
In the example I gave where you would run "kdesu Thunar", it is a graphical program... you would select the file gotmail.wav from wherever you saved it, and copy it, then navigate to /usr/share/sounds and paste it. Or open to windows and drag and drop like you would with file managers on other OSes. If you use this method, there is no need to use a terminal command at all.
If you choose to accomplish the task with commands in the terminal, you would do it with the command:
sudo cp gotmail.wav /usr/share/sounds
This assumes you have saved the gotmail.wav file into your home directory. Note that the shell (the program which runs "inside" the terminal program and reads input from you and executes commands) has a "working directory" - some state which says where the shell is looking for files which are not specified with their full path. The default working directory is your home directory. You can ask the shell to print the current working directory by using the "pwd" command (print working directory), and can change it with the "cd" command (change directory).
One advantage of using commands in the terminal is that it is very easy for people in forums like this to give you commands to execute in a terminal. This is unambigious and the recipient of the instruction can simply copy-paste the advice to reduce the chance of an error. Other advantages include being able to store a complex or long series of commands in a "script" and run them multiple times with ease. It is also easier to control machines with a terminal over slow network connections than by using something like a remote desktop tool.
An interactive shell's basic work flow is to read commands which are typed in, execute them and when they are finished print a new "prompt" informing the user that they are ready for a new command. Running a process from an interactive shell does not block other processes on the system (Linux is multi-tasking). There are some advanced methods which allow you to run more than one process from a single terminal, but I don't think you are ready to try that yet.
The shell looks are each command, using the first part as the command name, and subsequent parts as arguments to the command. The shell does a few things - first it does alias substitutions (expanding special abbreviations to full commands), then it looks to see if the command name is an internally implemented function, and if so execute it (by internally implemented I mean implemented with the shell program).
If the command name does not refer to an internally implemented function the shell will look though a list of directories called the PATH for files which have the same name as the command name and are executable. If one if found, a new process is started for that executable file, and the argument list is passed to it.
When the command is complete, the shell prints a message to tell the user that it is ready for another command.
OK, I'm not going to explain all of shell usage - if you are further interested in this subject I would recommend reading one of the very many tutorials and guides on the subject. Suffice to say the shell is a very useful tool, but you can usually accomplish similar tasks using graphic tools if you prefer.