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.
To copy the file into /root directory you need to be root or have permission as TB0ne said. Now, if you are root you can copy the file by issuing --
cp mySrcFile1 [mySrcFile2 mySrcFile3 ...] /root/
Here, the mySrcFile1, mySrcFile2, mySrcFile3 etc.. are files that you want to copy and /root/ is destination where you want to copy. '[' and ']' braces shows that mySrcFile2, mySrcFile3 etc.. are optional.
If you are not root then you may use sudo command.
Here, you may replace the <cmd> with the command (like cp for copying file) that you want to use.
Copying files under Linux is similar to copying files under DOS. Here's an example using the cp (copy) command:
$ cp goulash recipes/hungarian
$ cp stuff stuff.bak
The first example copies the goulash file from the current directory and stores it in your recipes/hungarian directory. The second example creates a file called stuff.bak in the current directory that is identical to the source file stuff.
Note: The cp command will overwrite files with the same name without warning. To be prompted before overwriting, use the -i flag, like so:
There is another way of getting a file into root or any other admin password protected dirrectory and that is.
Click on File system go to the dirrectory that you are wanting to copy a file into.
Right click on this and select open as administrater, enter your password when prompted.
Next go to the file that you want to copy into what was a protected dirrectory, right click the file and select copy, now go back to your dirrectory of importation and paste the file in to that dirrectory.
While there right click the file and select properties, you want to ensure that your user name has the right to acces that file so set the permisions to reflect what you want.
Some file managers (e.g. nemo, nautilus(?)) allow you to open a directory as root.
Options such as copy & paste will work.
Since you are running as root, there is no limit to the potential damage you can do.