Hot answers tagged

44

With CentOS 6 everthing is handled by udev now. Go into /etc/udev/rules.d and delete the 70-persistent-net.rules file and reboot. If you open it berfore hand you will most likey see the original NIC MAC listed as eth0 and the new one as eth1. Now you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 and manually update to the MAC of your new NIC ...


37

CentOS is essentially RedHat Enterprise with the stuff they can't include (i.e. RedHat specific stuff that isn't licensed for free redistribution) removed. CentOS tends to be closer to RH Enterprise as it is based fairly directly on it, where Fedora tends to be a bit more leading-edge.


31

Use carefully, there are security issues with sudo and variables. From man sudoers I found that you should use Defaults env_reset Defaults env_keep += "PYTHONPATH OTHERVARIABLE YETANOTHER" In Ubuntu, sudo does preserves some variables. sudo -i is more like logging in as root and then running the command. Both may be inconvenient, the ...


28

It strongly depends on how you call your program with sudo or su. E.g. on the system on which I am in this moment: .bashrc COMMAND $HOME $USER Env. $PATH 1. sudo -i (root) root root [1] 2. sudo -s (USER) root USER /home/${USER}/bin:[1] 3. sudo /bin/bash (USER) root USER ...


21

It's the initial size necessary to store the meta-data about files contained in that directory (including names). The initial allocation equals the size of one sector, but can grow above that if necessary. Once allocated, space is not freed if files are removed, to reduce fragmentation. For example: $ mkdir testdir $ cd testdir $ ls -ld . drwxr-xr-x 2 ...


19

is jenkins a service account with no shell configured in /etc/password If that's it try sudo su -s /bin/bash jenkins


19

If you have full sudo access, you can become root using sudo su -, so the security point is moot. Indeed, there is a way to discern the difference between a program ran as root and a program ran under sudo - using getuid vs geteuid - but this is a contrived trick. Why would a patch system do that?


15

The rpm cache directory location can be found in /etc/yum.conf cachedir=/var/cache/yum/$basearch/$releasever You should change the $basearch and $releasever, values based on your red hat release version. If you want to keep the rpm cache after installation the keep cache value should be set 1 in: /etc/yum.conf set keepcache=1


13

This is an excerpt from the Bash man page: export [-fn] [name[=word]] ... export -p The supplied names are marked for automatic export to the environment of subsequently executed commands. If the -f option is given, the names refer to functions... If you only need the variable in the current environment, it's not ...


13

On Linux machines, eth0 and eth1 correspond to real network ports. To add an eth2, you'll need to add another NIC, either by adding an internal PCI(e) network card, or by adding a USB network adapter. See Redhat network interface configuration. If all you want is another IP address, you can create an ethernet alias on one of your existing adapters. An ...


13

You have to do a little bit more than using hostname. The following link below should solve your problem. Change your Hostname without Rebooting in RedHat Linux Make sure you are logged in as root and move to /etc/sysconfig and open the network file in vi. cd /etc/sysconfig vi network Look for the HOSTNAME line and replace it with the new ...


12

Red Hat pricing details are here http://aws.amazon.com/rhel/ and Amazon Linux is here: http://aws.amazon.com/amazon-linux-ami/; as you say, RHEL implies additional cost, whilst Amazon Linux involves 'no additional charge' beyond the charges for running instances and related services. Amazon Linux, like CentOS, is based on RHEL -- it is fundamentally a ...


11

If you are looking for Red Hat Enterprise Linux . thats not free. Fedora is a Linux-based operating system that showcases the latest in free and open source software. Fedora is always free for anyone to use, modify, and distribute. (http://fedoraproject.org/) The Fedora Project is a Red Hat sponsored and community supported open source project. Its goal is ...


11

Yes, it's called Fedora.


11

Centos is basically RHEL recompiled from scratch, and i believe their version numbers are identical to their RHEL counterparts - Its commonly used as a replacement for RHEL. You might also want to consider scientific linux, which is another RHEL derivative, and is almost identical. RHEL has archives of quite a few versions in the 5.x family, while SL has ...


11

Yes, the find command can do this. It will take some experimentation and reading and re-reading the man page to get it to do what you want, but is amazing command. Below are 2 examples: find . -type f -ctime -2 -print0 | xargs -0 tar -rvf ~/dev_customer_attributes.tar find . -mmin -400 > /tmp/files.txt The 1st find uses -type f to list only files. ...


11

Maybe I'm not understanding the question, but assuming you have root (or sudo) privileges, then reboot (or /sbin/shutdown -r now) will perform a full system reboot.


11

You're not the only one. As documented in ssh_config(5) you can't unset SendEnv, because Multiple environment variables may be [...] spread across multiple SendEnv directives. If you have root on the test machines you could change AcceptEnv to not accept variables sent by the client, though.


10

To restart your machine just use reboot All the services that are configured to start will be started as usual.


9

There is also CentOS if you are still looking for a server environment. CentOS is compiled from Red Hat's source, and is essentially the same, just without any Red Hat branding. There are some minor differences, but the distro attempts to maintain 100% binary compatibility with Red Hat. You can download the latest release online for free.


9

You're trying to execute programs from a partition mounted with the noexec option (likely /tmp). Either move them to a directory that is mounted with exec rights or use mount -o remount,exec /tmp (as root) to allow programs to be executed on /tmp. You can make this behavior persistent by removing the noexec option from /etc/fstab or your init scripts.


8

DistroWatch typically has a pretty good run down of what each distro has. Red Hat's run down


8

Red Hat Enterprise Linux (RHEL) is an enterprise-class Linux distro whose goal is long-term API/ABI stability. Fedora Linux (Fedora) is a developer-class Linux distro whose goal is to test and showcase new technologies. Every few years a new version of RHEL comes out, containing stabilized forms of the technologies previously used in Fedora.


8

If you are wanting to try Red Hat Enterprise Linux (RHEL) check out CentOS. It's exactly the same as RHEL but with copyrighted RedHat logos removed. Basically it boils down to: RHEL = CentOS = Oracle Unbreakable Linux - Server OS, with stable packages and 'certified' to run certain proprietary enterprise software. Has ancient version of most packages (by ...


8

Yes, RHEL is based on Fedora. See this Fedora Wiki article: http://fedoraproject.org/wiki/Red_Hat_Enterprise_Linux Red Hat Enterprise Linux (or RHEL) is a commercially supported derivative of Fedora tailored to meet the requirements of enterprise customers. It is a commercial product from Red Hat which also sponsors Fedora as a community project. ...


8

You do not have to write code. First generate your key pair by ssh-keygen Second, use ssh-copy-id to distribute your public key ssh-copy-id username@remote-machine Note that you need to provide your password when running this command. After that, you can login the remote machine without password. Here are some explanations for the commands from the ...


7

This worked for me in gnome 2.30. System->keyboard shortcuts -> disable shortcuts for "move between windows using a popup" and "move between windows immediately" (select with mouse and press backspace) Open terminal and type gconf-editor navigate to apps-> metacity ->global keybindings 3a. for the entry : "switch_windows" type "<Alt>Tab" without ...


7

Most (if not all) modern distributions will include the lsb_release command. heillinr@mojojojo:~$ lsb_release -r Release: 9.04 heillinr@mojojojo:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 9.04 Release: 9.04 Codename: jaunty Should give you what you are after :)


7

Sometimes 4096 bytes is the smallest allocation unit for some filesystems. That's why directory has 4096. The same thing apply to files. Even though some files might report fewer than 4096, they are actually taking al least 4096 of storage from disk.


7

Take a look under /var/cache/yum directory. They should be there unless you have some kind of autocleanup going on. If you do, try this command: find /var/cache/yum -iname '*.rpm' – If there's nothing there, see the cachedir variable in /etc/yum.conf and check out what's the current directory for storing packages. It can also be that tmpwatch or some ...



Only top voted, non community-wiki answers of a minimum length are eligible