- Lubos Rendek
ObjectiveBy default the regular user does not have an ability to execute commands with root privileges. As a result the following message will appear:
$ sudo -i [sudo] password for linuxconfig: linuxconfig is not in the sudoers file. This incident will be reported.
RequirementsPrivileged root access to your Redhat 7 Linux server installation.
- # - requires given command to be executed with root privileges either directly as a root user or by use of
- $ - given command to be executed as a regular non-privileged user
Add user to WHEEL groupUsing your current shell or log in as a root user execute the following command to add any user you wish to grant a sudo access. The example below will give a sudo access to
# usermod -G wheel linuxconfig
- Nick Congleton
AboutThere is a gap between Windows and Linux. That's obviously an unpopular thing to say, but it's undeniable, especially when concerning third party support. Games and professional applications like Photoshop and 3D modeling tools are either woefully under-supported or unsupported altogether. Things have improved over time, but there is still need for a bridge. That bridge comes in the form of WINE.
WINE is not an emulator or a virtual machine. Rather, it is a lightweight compatibility layer that "translates" Windows applications into a language that Linux can work with. For years, WINE has been an invaluable tool for Linux users who just needed that one unsupported application to work. It has also been the answer for gamers looking for their favorite games on Linux, long before Steam was an option.
WINE isn't perfect. It's actually far from it. DirectX 10 support is spotty at best and DirectX 11 support is nearly non-existent. It is, however, in constant development, and the developers are always working to improve it. The WINE of today is miles beyond what it was just a few short years ago.
This series of guides will walk you through the tools that WINE provides for getting your Windows programs working on Linux. It does no rely on wrappers and scripts like PlayOnLinux because they aren't all that reliable. Learning the way WINE actually works may be more difficult and time consuming in the short term, but in the long term, you will not be reliant on external sources to get your applications running. These guides start off with the basics and installation of WINE and progress through configuration tools like
winetricks. You will be able to create application specific configurations and use different WINE prefixes as well as being able to install Windows
dllsand components to add functionality to your applications.
- Nick Congleton
IntroductionCode would quickly become an ugly and unruly mess if there wasn't a way to easily repeat and reuse it. You've already seen some of that with loops. They're great for repeating the same task multiple times right away. What if you wanted to reuse a block of code whenever you wanted? Well, that's where functions come in.
Here's another trip back to math class. If you remember, functions took in a number, did something to it, then outputted the new value. They were often represented in tables with the input on one side and the output on the other. Functions in programming are similar. Sometimes they take input. Sometimes they don't. Much of the time they return a value as well, but they don't always have to. In every case, they are used to repeat an operation whenever they are used, and that's the greatest similarity with the math concept.
- Nick Congleton
IntroductionYou've already gotten acquainted with dictionaries, but just like the other data structures Python supports, there are methods and more powerful ways to use them. There aren't as many methods for working with dictionaries as there are for lists, but that's because dictionaries just don't need them. Plus, many of the ones that do exist, work to break down dictionaries into lists and tuples to make them easier to manage. So, those list methods can be used in conjunction with the dictionary ones to create an efficient machine for handling data.
Items, Keys, and ValuesThese methods work to break down dictionaries into other data structures to make working with them much more manageable. Doing so also gives access to the methods of those data structures. Through these combinations of methods and loops, you can access and manipulate data with ease.
- Nick Congleton
IntroductionSomebody hit lists with gamma rays. Okay, so
Dictionariesaren't the Incredible Hulk, but they are supercharged in what they can do. In other languages, dictionaries are referred to as hashes, associative arrays, and associative lists. It's probably best to think of them as associative lists because that's exactly what they are. Dictionaries are lists that associate two values with one another. To think of it in terms of an actual dictionary, they associate a word, or
keywith a definition, or
value. They function sort of like a list with custom indexes.