Tag Info

Hot answers tagged

37

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 ...


23

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 ...


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?


17

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 ...


11

Quick way #1: if you have a "System" menu entry on the top line, and there's an item in the menu that says "About Gnome", you're probably running Gnome. Quick way #2: ps -ef | grep gnome


11

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 ...


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 ...


10

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 ...


10

Yes, it's called Fedora.


10

Have a look at your installed applications. If a lot of them start with K - you're on KDE. If a lot of them start with G, you're on Gnome. Seriously. (Not very accurate if you have both installed though). If you go to the About page of your computers settings panel, that should give you some clues. Alternatively, look around on Google Images for ...


10

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 ...


9

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


9

I'll show you a short selection and description of the most common desktop environments. Unity Unity is developed by Canonical. It has a bar at the top which contains the clock at the right and a button on the left which will bring up a search/menu window. There's a launcher on the left of the screen. The default theme colors are purple/orange/brown. ...


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.


9

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. ...


8

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 ...


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 ...


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

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.


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. ...


7

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


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

There are some important changes in the behavior of these two invocations. Let's use an example, with the structure created by: mkdir mydir/{.a1,a2,a3}/{.b1,b2}/{.c1,c2} -p If you invoke du --max-depth=2 mydir you will get: 0 mydir/.a1/.b1 0 mydir/.a1/b2 0 mydir/.a1 0 mydir/a2/.b1 0 mydir/a2/b2 0 mydir/a2 0 ...


6

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


6

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.


6

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 ...


5

Many programs (the binaries/scripts) end up in /bin or /usr/bin with other parts in various configuration directories (often in/under etc) as you already noted. For any specific command you can checkout whereis whereis prog_name and it will give you some information about where this command is to be found. You can also try which which prog_name ...


5

In GNOME 2.6, the Nautilus file manager uses "Spatial" file management mode by default. What you are looking for is the "Browser" mode. Go to Edit → Preferences, click the Behaviour tab, and enable the Always open in browser windows option. (As for "like in Windows" – Windows 95 used spatial mode by default too.)



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