How to get the previous hostname of my linux system? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have accidentally changed my system to host name. Now i want to change it to my previous host name. But i don't know the previous host name.

Have a look at these files:
/etc/hostname
/etc/hosts
/etc/ssh/ssh_host_*_key.pub
$HOME/.ssh/id_*.pub
In these typically the host name appears and it might be still unchanged by your renaming action (however you did that).
Also these might contain the old name:
/var/log/Xorg.failsafe.log
/var/log/auth.log.1
/var/log/pm-suspend.log.1
/var/log/Xorg.1.log.old
/var/log/lightdm/x-0.log
/var/log/lightdm/x-1.log
/var/log/lightdm/x-2.log
/var/log/pm-suspend.log
/var/log/Xorg.0.log.old
/var/log/Xorg.1.log
/var/log/syslog
/var/log/Xorg.2.log
/var/log/auth.log
/var/log/kern.log.1
/var/log/kern.log
/var/log/Xorg.failsafe.log.old
/var/log/syslog.1
/var/log/Xorg.0.log

In most cases HOSTNAME is defined in /etc/sysconfig/network file, to be set when boot. In some cases you can find it in /etc/hostname

Related

What is the "1" in this column "drwxr-xr-x 1 bash bash 4.0K Dec ..." [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I read that "1" is the number of hard links to the specific file, but what exactly are hard links?
In computing, a hard link is a directory entry that associates a name
with a file on a file system. All directory-based file systems must
have at least one hard link giving the original name for each file.
The term “hard link” is usually only used in file systems that allow
more than one hard link for the same file.

How to check which user is positioned in a directory on linux terminal? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
yesterday i was shown that i can't unmount a mounted partition (like /media/test or /mnt/test) if someone is using the terminal in that directory (maybe in ssh connection).
he used a command that listed the user on that directory with pid of process in order to kill the pid and unmount the partitions.
I don't remember the command, could you help me?
ty
This one works nice:
lsof | grep '^bash.*cwd'

User Wise TIME ZONE possible in Linux Red HAT [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Any possibility to changes user wise time zone in Linux.
Which user (a web client, or someone remotely logged thru ssh)? He could set the TZ environment variable, perhaps by adding a line like
export TZ='Europe/Paris'
in his ~/.bashrc file if bash is his login shell.
See environ(7) and tzselect(8)

Can't copy file as root in Linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am using Cent-OS and I am trying to copy a file. I su to root first, then I execute:
cp test.txt /usr/java/jdk1.7.0_45/jre/lib/management
But I get an input/output error. Why can't I copy this file as root? Is there something that can lock a folder in Linux so root can't change it?
root is a concept to get around the system's permissions.
IO error is a more physical problem that could be of a much more varied nature. Common examples included faulty media, unreadable CDs, lost connection, and so on.

Trying to find out why I lost my file system on Ubuntu 11.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I recently made the following (i believe important) changes to my system
Actually I was following this tutorial to use something called Linux Containers.
So can you tell me if any of the following stuff is capable enough to crash my system ?
1. Making changes to /etc/fstab or
2. mount /cgroup which will try to mount cgroups automatically or
3 making changes to etc/network/interfaces or
4 making changes to /etc/resolv.conf
A typo in fstab can definitely make a system un-bootable. However, you should be able to boot from CD, mount the HD, and fix it.

Resources