Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [centos]

Questions specific to the CentOS Linux distribution. Use this tag if your question relates to how the CentOS distribution affects your problem; do not use it if you just happen to be using CentOS and your question is about a specific configuration detail or syntax.

11
votes
2answers
8k views

Why is there a discrepancy in disk usage reported by df and du? [duplicate]

I have a Linux CentOS server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the total ...
5
votes
2answers
11k views

Using Awesome window manager on CentOS 7

Awesome works fine on Fedora 19, so it should work on CentOS 7, right? Well, I tried and failed to get it to work. After a long time, I managed to compile it from source and set GDM to boot from an ~/...
10
votes
2answers
14k views

Separate Network Traffic on Two Network Interfaces

Could you lend your expertise in understanding how to go about configuring the separation of network traffic on two network interfaces? As I understand thus far, static routes are used for network ...
12
votes
5answers
16k views

Moved bin and other folders! How to get them back?

I accidentally moved all folders from root to a subfolder. (/bin, /etc, /home, /lib, /usr... all moved) The only ones that were not moved, since they were in use, are /bak, /boot, /dev, /proc, /sys. ...
22
votes
2answers
22k views

How to colorize output of ls ?

I'm running CentOS in Linux text mode. When I run the command ls /usr/, the output is too hard to read (dark blue on black). How can I change the text coloring?
9
votes
3answers
15k views

Systemd kills service immediately after start

I'm writing systemd unit file for OSSEC HIDS. Problem is that when systemd starts service it immediately stops them. When I use that ExecStart directive all working fine. ExecStart=/var/ossec/bin/...
6
votes
1answer
9k views

Rename All Files with a Certain Name

I'm trying to find certain files with the name "stringx" and replace the name (but not the extension) with "stringy". So basically for stringx.txt and stingx.cs, I'd want stringy.txt and stringy.cs. I'...
183
votes
3answers
917k views

How to install Desktop Environments on CentOS 7?

I have recently installed CentOS 7 (Minimal Install without GUI) and now I want to install a GUI environment in it. How can I install Desktop Environments on previously installed CentOS7 without ...
6
votes
1answer
1k views

Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?

On CentOS, the rename command uses two simple strings, from and to. rename from to file... while on Debian/Ubuntu it uses a perl-style regular expression. rename [ -v ] [ -n ] [ -f ] perlexpr [ ...
42
votes
5answers
42k views

How can I limit the bandwidth used by a process?

I have a CentOS 5.7 server that will be backing up its files nightly. I am concerned that visitors to the various sites that the server hosts will experience degraded performance while the backup is ...
12
votes
4answers
23k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
140
votes
11answers
231k views

Is CentOS exactly the same as RHEL?

I'm sure this question has been asked again and again elsewhere (I did not find anything specific to CentOS vs RHEL in SE), but I would still like to ask and confirm a few specific points. I am well ...
50
votes
10answers
120k views

CentOS no network interface after installation in VirtualBox

I have Ubuntu 12.10 on which I installed virtual box on which I setup Centos 6.4 i386. On Ubuntu I have: 3.5.0-17-generic kernel running. On virtual box I install Centos 6.4 and everything works fine,...
3
votes
2answers
4k views

Why booting into rescue mode menu doesn't do anything?

When I enter into grub menu, I get two entries : CentOS Linux (3.10.0-514.21.1.el7.x86_64) 7 (Core) CentOS Linux (0-rescue-e1ac24cbe9f94f2caa228d77e027be8b) 7 (Core) When I boot into the second line ...
1
vote
1answer
5k views

How to update Apache and PHP using SCL?

I'm testing an upgrade of PHP using SCLs. The testing is happening on a local VM so its OK to break things as we develop a procedure. Following The SCL Repositories I was able to update Python to 2.7....
86
votes
2answers
75k views

How to shrink root filesystem without booting a livecd

I find myself needing to rearrange a system's partitions to move data previously under the root filesystem into dedicated mount points. The volumes are all in LVM, so this is relatively easy: create ...
130
votes
2answers
417k views

ifconfig command not found

I've just installed CentOS7 as a virtual machine on my mac (osx10.9.3 + virtualbox) .Running ifconfig returns command not found. Also running sudo /sbin/ifconfig returns commmand not found. I am root. ...
124
votes
9answers
459k views

How can I fix “cannot find a valid baseurl for repo” errors on CentOS?

I finished installing CentOS 6, but when I tried running yum update I got: [root@centos6test ~]# yum update Loaded plugins: fastestmirror, refresh-packagekit Determining fastest mirrors Could not ...
45
votes
2answers
64k views

CentOS: List the installed RPMs by date of installation/update?

I'm on a CentOS machine. I updated and installed some packages a few weeks back, but I don't remember the name of every package or the names of every dependency. I used yum. Can I list the packages ...
21
votes
5answers
83k views

What is the default idle timeout for OpenSSH?

I can't seem to find an answer to this simple question, which I need for some compliance documentation. On a default install of CentOS 6.5 (OpenSSH 5.3p1-94.el6), after how long of being idle will ...
10
votes
1answer
15k views

How to download a file from repo, and install it later w/o internet connection?

Assuming that I want to install a program called leafpad later. Currently the only way to install it is via: yum install leafpad -y but I want to save this and install it later without internet ...
10
votes
3answers
21k views

How to make NetworkManager add a DNS server at the top of /etc/resolv.conf?

Right now, my /etc/resolv.conf looks like this: # Generated by NetworkManager nameserver 10.165.246.33 nameserver 192.135.82.60 nameserver 10.165.74.2 The first two nameservers are automatically ...
4
votes
2answers
2k views

Commands for determining level of usage of server

I am scripting a new program that will connect to a cluster of machines in a VM park, and hopefully check their level of usage. The VM clients are a combination of RHEL and CentOS, and runs on ...
1
vote
2answers
1k views

Why doesn't my blockdev config change execute from rc.local on reboot

I am (probably obviously) a relatively new Linux user, so I'm already bracing for the barrage of "why aren't you doing it this way instead..." comments. I'd love to hear them...but I would also really ...
75
votes
2answers
101k views

How do I display log messages from previous boots under CentOS 7?

Executing journalctl under a CentOS 7 system just prints messages generated after the last boot. The command # journalctl --boot=-1 prints Failed to look up boot -1: Cannot assign requested ...
105
votes
2answers
186k views

In CentOS, what is the difference between yum update and yum upgrade?

What is the difference between yum update and yum upgrade, and when should I use one over the other?
42
votes
4answers
181k views

Why the default eth0 interface is down by default on CentOS?

I am already a little bit familiar with Linux distros like Debian or Ubuntu (yeah, very similar) but I wanted to try Red Hat based - CentOS 6.2 . I have installed it on my Windows 7 host in virtualBox ...
21
votes
3answers
69k views

Windows boot option is missing after installing CentOS 7, how can I get it back?

I recently installed CentOS 7 on a machine that has been running Windows 7. I did a dual boot installation and installed CentOS in a partition. But when I boot up my machine, it only gives me two ...
17
votes
3answers
75k views

I Can't login as root with su command, but I can with SSH

How is it possible that I cannot log in as root by su root or su (I get incorrect password error), but I can log in by ssh root@localhost or ssh root@my_local_IP with the same password? I'm using ...
12
votes
5answers
12k views

How do I drop root privileges in shell scripts?

The "--up" option in OpenVPN is normally used for routing etc. And so it is processed before OpenVPN drops root privileges to run as nobody. However, I am invoking shell scripts that need to run as an ...
5
votes
1answer
20k views

CentOS conservative governor, nice error

I changed my CentOS 6 CPU governor from ondemand (the default one) to conservative and got this after restarting the cpufreq service: /etc/rc5.d/S13cpuspeed: line 88: /sys/devices/system/cpu/...
12
votes
3answers
30k views

how to set crontab PATH variable

I had a problem running a script from crontab. After some research I understood the problem was because PATH parameter doesn't include /sbin. I looked what it does include in /etc/crontab: PATH=/...
10
votes
2answers
53k views

What is the best way to add a permanent route?

I need to add a route that won't be deleted after reboot. I read these two ways of doing it : Add up route add -net 172.X.X.0/24 gw 172.X.X.X dev ethX to the file /etc/network/interfaces or ...
8
votes
3answers
14k views

What does it mean to be in group 0?

Several users in a system I inherited have their group set to 0 in /etc/passwd. What does that mean? Do they essentially get full root privileges? The system is running CentOS 5, and the users ...
2
votes
2answers
2k views

How can I make a process I start during an SSH session run after the session has ended? [duplicate]

Possible Duplicate: Keep SSH Sessions running after disconnection. I have a process which is basically a web-server, I start it during an SSH session. However, when I leave the session (by ...
0
votes
1answer
181 views

Making “at” work on macOS

I am working on a CentOS server and schedule a task with command at # echo "touch a_long_file_name_file.txt" | at now + 1 minute job 2 at Wed Oct 31 13:52:00 2018 One minute later, # ls | grep ...
47
votes
2answers
89k views

CentOS 6 “Default” Installation Options

Can someone tell me the difference between a Desktop Install, a Basic Server install, and a Minimal Install? During installation, it doesn't give a description and I can't find documentation on it ...
19
votes
1answer
146k views

Install Apache 2.4 on CentOS using yum

I need Apache 2.4 in CentOS because with Apache 2.2 mod_proxy_wstunnel is not possible. I have tried this, but unfortunately its for RHEL. After installing, I can't execute the Apache 2.4. Can anyone ...
8
votes
1answer
90k views

How can I create an SFTP user in CentOS?

I'd like to give temporary SFTP access to a support guy. How do I create an SFTP user? And how can I delete it once the job is done? Also, how do I specify a home directory for them? Can I prevent ...
30
votes
10answers
114k views

“Symbolic link not allowed or link target not accessible” / Apache on CentOS 6

I've got a brand new CentOS 6 installation, which has a symlink in the document root to my development files: [root@localhost html]# ls -l total 4 -rwxrwxrwx. 1 root root 0 Sep 18 20:16 index.html -...
35
votes
6answers
91k views

Equivalent of update-grub for RHEL/Fedora/CentOS systems?

In Ubuntu (and I guess in Debian too) there is a system script named update-grub which automatically executes grub-mkconfig -o with the correct path for the grub configuration file. Is there any ...
14
votes
1answer
29k views

Configuring OpenVPN to use Firewalld instead of iptables on Centos 7

I need to configure OpenVPN on Centos 7 using firewalld. I used iptables on Centos 6.5 and only had to add the following lines to /etc/sysconfig/iptables: -A POSTROUTING -s "10.0.0.0/24" -o "wlan0"...
14
votes
3answers
45k views

What does eno mean in network interface name 'eno16777736' for CentOS 7 or RHEL 7?

Under consistent network device naming scheme, what does 'eno' stand for in network interface name eno16777736 for CentOS 7 or RHEL 7?
48
votes
2answers
127k views

Local installation of .rpms using YUM

I'm asking this question cautiously because I don't want to get this wrong. I have a program_name.rpm file saved locally on my server (CentOS 6.5). I have installed it previously just by navigating ...
14
votes
4answers
41k views

How do I safely delete old kernel versions in CentOS 7?

I might be encountering odd symptoms resulting from competing kernels in CentOS 7. So how do I safely delete the old kernels? And how do I know which kernel is the newest one? Below is the ...
15
votes
1answer
29k views

Installing fail2ban on CentOS 7

I am using @GarethTheRed 's answer to this question to install fail2ban on a remote CentOS 7 server. I am able to complete all the steps up until tail -f /var/log/fail2ban.log, at which point I get ...
30
votes
2answers
4k views

What is the difference between shutdown 18:00 and at 18:00 shutdown?

at 18:00 shutdown now and shutdown 18:00 , are they starting the same service? Do they work the same way?
4
votes
4answers
54k views

setting mysql root password in CentOS 7

How can I log into the mysql 5.6 command line client and reset the root password in Centos7? I read the following at this link, but it does not work: 1) sudo service mysqld stop 2) sudo service ...
4
votes
5answers
2k views

How do I “install” CentOS?

Taking my first Linux course and, ironically, I think I've hit a problem that could be fixed by someone proficient in Linux! As part of the course I'm taking, we're required to download and install ...
14
votes
2answers
25k views

When exactly does tmpwatch clear out files I place in /tmp?

CentOS 6.x I'm confused on when exactly files I place in /tmp/ are deleted. /etc/cron.daily/tmpwatch has the following: #! /bin/sh flags=-umc /usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/....