LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 02-15-2016, 11:07 AM   #1
RacingFan3139
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Rep: Reputation: Disabled
Accessing the root@desktopX Directory


Hello,

I am completely new to Linux and I need some help. I know how to successfully enter into the root directory for the server, however, I am not sure on how the root directory for the desktop. Therefore, what command(s) should I use to access the desktop's root directory?

Thanks in advance,
RacingFan3139
 
Old 02-15-2016, 11:13 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Welcome to LQ!

Please describe in more detail what you are trying to achieve and why. People new to Linux often do not realize there are number of ways to get job done in Linux, things that are impossible in Windows are possible in Linux. So describing the goal instead of asking how may lead to surprising solutions.
 
Old 02-15-2016, 11:29 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I don't understand the question. What is "desktop's root directory"?
 
Old 02-15-2016, 11:38 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
/root/Desktop doesn't exist until root logs in graphically.
Something that is generally discouraged.

Most servers don't have a GUI, generally speaking, so "desktop's root directory" is ambiguous.
And being "completely new to Linux", is a Red Flag.

Why are you asking?
Please elaborate and cite your references.

Last edited by Habitual; 02-15-2016 at 11:39 AM.
 
Old 02-15-2016, 01:04 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by RacingFan3139 View Post
Hello,
I am completely new to Linux and I need some help. I know how to successfully enter into the root directory for the server, however, I am not sure on how the root directory for the desktop. Therefore, what command(s) should I use to access the desktop's root directory?
I am going to take a guess, and assume you mean "How do I log in to the GUI/Window manager as root on the console?"

Short answer is: you don't...it's disabled for VERY GOOD SECURITY REASONS. As you're new to Linux, be aware that you should *NEVER* log in as root (or even ASSUME root with "su -"), unless you have an excellent reason for doing so. Treat the root account like a loaded gun.

Longer answer: you CAN, but how you enable that access depends on the version/distro of Linux and the window manager/login manager you're using. While it CAN be modified, it isn't simple (usually), and that takes you back to "Don't EVER LOG IN AS ROOT"
 
Old 02-15-2016, 01:17 PM   #6
RacingFan3139
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
I apologize about my post. I should have been more clear on my question. I am learning Linux for the first time by taking a course that is provided by the RHA (Red Hat Academy). What I am trying to do, or the goal of this assigned practice, is to configure a host name on the desktop's root file, as seen in the attachment.

Picture Note: In the attachment, I am assuming that the letter X is my foundation number.

As a result, I was wondering how I can access the desktop's root file in the terminal and be able to set the provided host name on the system.
Attached Thumbnails
Click image for larger version

Name:	Root at Desktop.png
Views:	26
Size:	13.2 KB
ID:	20848  
 
Old 02-15-2016, 07:00 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Still doesn't make sense.

Please define a couple of things for me if you would, because I think there's a language problem here:
1) "desktop"
2) "root file"
 
Old 02-15-2016, 07:48 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
What distro/version are you using and what have you tried so far?

As general information, hostnames are commonly stored in a file in the /etc directory. The exact name and format of the file(s) in question can vary slight depending on the particular distro.

You might want to take a look at this, if you have not already done so: http://www.linuxquestions.org/linux/...Ask_a_Question
 
Old 02-15-2016, 08:01 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
The desktop has nothing to with the hostname. The hostname can be anything but typically is a fully qualified domain name.

http://www.cyberciti.biz/faq/rhel-re...tname-command/

Last edited by michaelk; 02-15-2016 at 08:04 PM.
 
Old 02-15-2016, 08:14 PM   #10
RacingFan3139
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
The Linux distro/version that I am using in the course is Red Hat Enterprise Linux Server 7.0.

On the other hand, however, I think I figured it out. On the home screen, there are 4 icons: Home, Trash, View Server and View Desktop. I clicked on View Desktop and signed in. After signing in, I right-clicked the home screen, went to Open in Terminal and used the su - command in the terminal to access root. As a result, I believe that I am now able to finish the question I provided earlier.
 
Old 02-15-2016, 08:20 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
if you right clicked open terminal here that is just where you are at, the directory is desktop,
cd enter to get back home where you belong.

for hostname

Code:
sudo nano /etc/hostname
enter what hostname you want save then exit

domanname

Code:
 %userx@voided 08:18:34 ~ >>$ sudo cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>		<hostname.domain.org>	<hostname>
127.0.0.1		localhost.localdomain	localhost
::1			localhost.localdomain	localhost ip6-localhost
127.xx.xx.xx            voided.domainName.xxx    voided
# End of file
edit hosts conf

I don't know how legal that is, if you have apache installed it goes in there.

4 red hat I found this
Quote:
Permanent hostname change on RedHat based systems

RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME="plain.domainname.com"
GATEWAY="192.168.0.1"
GATEWAYDEV="eth0"
FORWARD_IPV4="yes"

So in order to preserve your change on system reboot edit this file and enter the appropriate name using the HOSTNAME variable.
at desktopx I think is what that said.

would be in that file "Permanent hostname change on RedHat based systems" /etc/sysconfig/network

Code:
HOSTNAME="desktopx.WHATEVERNAME-U-Want-HERE.com, org, net "
where .org .net .com are the common ones,
org = organization ~ non-profit organizations

com = commerce ~ the activity of buying and selling, especially on a large scale

net = network ~ mostly used for ones own server network, domain originally for network providers


domainname(1) - Linux man page
Quote:
Files
/etc/hosts /etc/sysconfig/network
Note
Note that hostname doesn't change anything permanently. After reboot original names from /etc/hosts are used again.

Last edited by BW-userx; 02-15-2016 at 08:57 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
move user directory and make it as a root's directory yerunkar11 Linux - Server 3 07-27-2015 11:39 AM
[SOLVED] Invoke root directory owner/group while moving file/directory yogesh_attarde Linux - Security 5 04-14-2014 11:36 PM
[SOLVED] trouble accessing a directory Cultist Slackware 6 04-12-2013 05:49 PM
accessing root directeries by otherthan root user pandian Linux - Software 2 12-16-2005 01:35 AM
Accessing the Active Directory GoRinNoSho Linux - Newbie 3 06-27-2003 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration