mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
20140811-1 选题
This commit is contained in:
parent
da9280f612
commit
f8cda2ce59
67
sources/talk/20140808 When Linux Was Perfect Enough.md
Normal file
67
sources/talk/20140808 When Linux Was Perfect Enough.md
Normal file
@ -0,0 +1,67 @@
|
||||
When Linux Was Perfect Enough
|
||||
================================================================================
|
||||
The other day my colleague, friend and sometimes partner-in-crime, Ken Starks, published [an article][1] here on FOSS Force on one of his favorite gripes: things that don’t work right in Linux. This time he was complaining about a font issue in Mint when using KDE. This is nothing new from Ken. In the past he’s written other articles about broken aspects of various Linux distros that never seem to get fixed. It’s his contention that these “small” bugs, which remain unfixed release after release after release, are largely responsible for desktop Linux’s failure to take hold with the general public.
|
||||
|
||||
### He might be right. ###
|
||||
|
||||
For Christmas I bought my roommate a new second generation Nexus 7 tablet running Android, an OS built around the Linux kernel. It “just worked,” out of the box, with no tweaking necessary. During the last seven months she’s used it for hours daily. As far as I know, she’s found no glitches that require fixing. I’m reasonably certain I’d know if she did, since the main reason I gave her the Nexus to begin with was because I had tired of trying to keep her Windows laptop running to her satisfaction. She has no trouble telling me when her computer goes kaput, and she always wants it fixed right now. Facebook waits for no one, you know.
|
||||
|
||||
I point this out because Linux has all but taken over the tablet and phone end of the computing spectrum. Apple makes plenty of money with the iPhone and iPad, but that’s due to their high prices. In market share, they lag far behind Android devices. And Microsoft has proven that Windows isn’t the unbeatable giant it was once thought to be. Even with massive money spent on television ads and conspicuous product placement in nearly every scripted drama on CBS, mobile devices running Windows remain a mere asterisk when looking at market share.
|
||||
|
||||
In other words, Linux is winning the mobile war because Google makes certain that Android “just works” out of the box.
|
||||
|
||||
Today’s average computer users (I loath the word “consumers”) want to get things done on their computers without having to delve under the hood to fix things. This is understandable and isn’t unlike the average automobile owners, who just want to drive their cars without knowing or caring how it works. Just as most drivers take their car to the shop for repair to solve mechanical and computer related issues, most computer users take their devices to the shop with no concern about whether the problem is hardware or software related. They just want the damn thing to work.
|
||||
|
||||
### It wasn’t always this way. ###
|
||||
|
||||
Back in 2002 I installed GNU/Linux for the first time. At that time, like most Americans, I was tethered to a dial-up connection, with broadband not yet being available in my part of the boondocks. I spent seventy bucks or so for a shrink wrapped Powerpack edition of Mandrake 9.0 at a local Best Buy store, which in those days sold both Mandrake and Red Hat, which was still in the desktop business.
|
||||
|
||||
During that age of the dinosaur, Mandrake was considered to be the cat’s meow of easy-to-use Linux distributions. It installed easily, some said easier than Windows, and its partitioning tool made cutting up a disk easier than slicing a piece of mincemeat pie. Indeed, Linux old-timers sometimes openly laughed at Mandrake, insinuating that ease-of-use somehow made Linux less Linux.
|
||||
|
||||
But I loved it and found it to be a whole new world. Gone was the blue screen of death and the nearly daily crashes that were business as usual with Windows. Unfortunately, also gone were a lot of peripherals that had “just worked” in Windows.
|
||||
|
||||
The first thing I had to do after installing Mandrake was to take my white box to Michelle at [Dragonware Computers][2] and have the cheap winmodem swapped out for a hardware modem. Granted, a hardware modem means a more responsive computer, but with the computer store forty miles away, this was a bit of an inconvenience and an expense I could little afford.
|
||||
|
||||
But I didn’t mind. I was free of Microsoft –- and using a “different” operating system made me feel as if I was some sort of computing genus.
|
||||
|
||||
Printers were also a problem, but not as much a problem with Mandrake as with most other distros which required command line work to install. Mandrake offered up a snazzy graphical interface for configuring printers – if you were lucky enough to have a printer that would work in Linux at all. Many, if not most, wouldn’t.
|
||||
|
||||
My still under warranty Lexmark, which in Windows had more whistles and bells than any printer needs, wasn’t supported by the manufacturer, but I was able to find an open source, backwards engineered driver that kinda, sorta worked. It worked fine for printing web pages from the Mozilla browser, but printed Star Office pages in tiny fonts that were crammed up into the upper right corner of the page. The printer also made some very loud mechanical clunking noises which reminded me of the noise a car transmission makes just before it dies.
|
||||
|
||||
The workaround for the Star Office problem was to save everything as a text file and print from a text editor. For the noise that indicated the printer was in self-destruct mode? Try to avoid printing as much as possible was my solution.
|
||||
|
||||
### Other problems abounded – too many for me to remember. ###
|
||||
|
||||
One problem I do remember is that I couldn’t get the sound card to work out of the box, although Mandrake’s interface showed the sound card detected and installed. After days of digging through the forums with no luck, someone finally suggested I might have a problem with permissions. I looked and, lo and behold!, he was right. Mandrake had installed the sound card with permissions which wouldn’t let it work in a user account, yet another one of those things that should have been fixed before the distro was released, as Ken would point-out. Especially in a distro being sold in a shrink wrapped box for seventy dollars a pop – which was considerably more money in 2002 than it is now.
|
||||
|
||||
Oh yes, and I still have a parallel port scanner that I bought new about two weeks before my move to Linux which has been nothing but a brick since, as there’s still no Linux driver for it.
|
||||
|
||||
My point is that back in those days none of this mattered. Most of us were already used to having to fiddle with configuration files and such, even when using “IBM compatible” computers running Microsoft products. Like most users in those days, I’d cut my teeth on command line DOS machines, where printers had to be configured separately for each and every program and where the ability to write a succinct autoexec.bat file was a necessity.
|
||||
|
||||

|
||||
Linux as a 1966 “goat.”
|
||||
|
||||
Tinkering with the inner workings of the operating system was simply part of owning a computer. Most of us using computers back then were either geeks or wanna be geeks. We were proud of our ability to tinker and get our machines working just like we wanted. We were the high tech version of the good ol’ boys from an earlier age, who spent their Saturday afternoons under a shade tree modifying their muscle cars with headers, breathers, trick carburetors and the like.
|
||||
|
||||
### And that’s mostly not who’s using computers today. ###
|
||||
|
||||
Today’s computer user just wants the computer to work, without problems, out of the box. They don’t want to have to figure out why Hulu or Netflix doesn’t work or why their fonts display properly in some applications and not in others. They don’t want to hear, “oh, that’s just an easily fixed small bug” after a Linux install any more than they want to hear that an ignition switch that stalls their new Chevy in heavy traffic is “only a glitch which we’ll fix one day.”
|
||||
|
||||
These days, that includes me. While I’m happy I have enough skills to usually fix a bug that made it past the developers at Mint or Fedora, I’d just as soon not have to deal with it. I have work to get done. And when I’m not working, I want to be wasting time with my friends on Facebook, not getting aggravated with my computer.
|
||||
|
||||
To be sure, Linux has changed with the times. In recent years you can pretty much be sure that when you install a major Linux distro on a laptop, Wi-Fi will work out of the box. Also, most of the time all you have to do is plug a new printer into a USB port and, presto!, it’s already up and running. But there are still way too many little niggling problems that need to get fixed – stuff that should have been fixed long ago.
|
||||
|
||||
Maybe if Ken keeps complaining enough…
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://fossforce.com/2014/08/when-linux-was-perfect-enough/
|
||||
|
||||
作者:Christine Hall
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://fossforce.com/2014/07/ripe-linux-nits-to-pick/
|
||||
[2]:http://www.dragonware.com/
|
@ -0,0 +1,66 @@
|
||||
How to Achieve Better Security With Proper Management of Open Source
|
||||
================================================================================
|
||||

|
||||
Bill Ledingham is the Chief Technology Officer (CTO) and Executive Vice President of Engineering at Black Duck Software.
|
||||
|
||||
Companies increasingly understand that the key to developing innovative software faster and better than the competition is through the use of open source software (OSS). It’s nearly impossible to use only commercially sourced code and get your software to market with the speed and cost constraints required by today’s product life cycles. Without the ability to choose and integrate best-of-breed OSS, some of the greatest product ideas might never see the light of day.
|
||||
|
||||
With the use of open source, however, comes a different set of challenges. While your teams can gain speed and agility, it’s often more difficult to ascertain the code’s true origin and assure that it is secure.
|
||||
|
||||
As the OpenSSL Heartbleed vulnerability proved, not knowing what code is in your application or finished product can potentially create critical security threats that require time-consuming remediation efforts. Conversely, having an accurate inventory of what OSS components and versions are used and where can prove invaluable for quickly responding to and remediating vulnerabilities.
|
||||
|
||||
### It’s What’s Inside That Counts ###
|
||||
|
||||
The Heartbleed bug reminded developers and companies just how important security is. While there has been widespread debate over whether proprietary or open source software is more secure, the issue is largely moot. The reality is that code defects exist in most pieces of software, regardless of origin, and some affect security.
|
||||
|
||||
Security challenges can become even more complex when open source is integrated with internal, proprietary code. In addition to the obvious risk of not properly managing license compliance, tracking code origins and use throughout an organization can become very difficult, very quickly.
|
||||
|
||||
To have a truly accurate understanding of your potential vulnerabilities, you need to understand three things:
|
||||
|
||||
1. What code is in your current products and applications?
|
||||
1. What code is being used in the front end of the development process and where are developers acquiring these components?
|
||||
1. What components are being used at the back end of the process and where does code need to be validated before it is deployed?
|
||||
|
||||
### Assessing the Situation ###
|
||||
|
||||
All companies should check their code against common vulnerability databases, such as the United States National Institute of Standards and Technology’s [National Vulnerability Database][1] (NVD). Resources like the NVD track security vulnerabilities and provide severity rankings to help companies keep their code secure and up to date.
|
||||
|
||||
If you’ve never reviewed your code against a vulnerability database, it may seem like a daunting task. Fortunately, there are [tools][2] that leverage these databases to regularly and automatically identify all open source security vulnerabilities, alerting and tracking where affected components are in use and in need of remediation.
|
||||
|
||||
Continuously monitoring your codebase helps guarantee that unknown code is identified, code origin is understood, license information is up to date and future security vulnerabilities are quickly flagged for resolution. If your company has an accurate code inventory in place, you can easily find vulnerable code and remediate it to ensure your business – and your customers – remain secure.
|
||||
|
||||
### Preventing Future Problems ###
|
||||
|
||||
Most developers are attracted to OSS because it’s easy to access and free to acquire, usually allowing them to forgo a formal procurement process. Yet, while many development organizations have policies or guidelines for open source use, they are not always enforced and often not properly tracked. It’s important to track what code is coming into your organization, whether it’s been approved for use and where it’s used throughout your organization.
|
||||
|
||||
Once you know what you have, you need to establish governance. By implementing a management framework throughout the development process, you can ensure accurate descriptions of the code are captured and eliminate questions as to what code is where and whether it’s up to date. Manually managing this process is nearly impossible, which is why best-in-class companies actively manage their use of open source through automated code management and audit solutions.
|
||||
|
||||
Although every company and development team is different, the following processes have been proven to help organizations of all sizes manage and secure their use of OSS:
|
||||
|
||||
- **Automate Approvals and Cataloging** – Capture and track all relevant attributes of OSS components, assess license compliance and review possible security vulnerabilities through automated scanning, approval and inventory processes.
|
||||
-
|
||||
- **Maintain Updated Code Versions** – Assess code quality and make sure your product is built using the most updated versions of the code.
|
||||
-
|
||||
- **Verify Code** – Evaluate all OSS in use; audit code for security, license, or export risk and remediate any issues.
|
||||
-
|
||||
- **Ensure Compliance** – Create and implement an open source policy, establish an automated compliance process to ensure open source policies, regulations, legal obligations, etc., are followed across the organization.
|
||||
|
||||
### Active Management is Key ###
|
||||
|
||||
As the use of software across industries proliferates, open source will continue to play a crucial role in developing the newest innovations. To prevent security vulnerabilities in this increasingly complex environment, companies must actively manage the flow of open source throughout their organization and establish processes to regularly check their code against vulnerability databases for fast and easy remediation.
|
||||
|
||||
*Bill Ledingham is the Chief Technology Officer (CTO) and Executive Vice President of Engineering at Black Duck Software. Previously, Bill was CTO of Verdasys, a leader in information and cyber security, where he worked closely with leading Global 2000 companies and government organizations to safeguard their most sensitive information. Bill has been on the founding team of four companies, is active in the Boston start-up community, and has been a partner/investor with CommonAngels for the past 6 years.*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.com/news/software/applications/782953-how-to-achieve-better-security-by-proper-management-of-open-source
|
||||
|
||||
作者:[Bill Ledingham][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.linux.com/community/forums/person/59656
|
||||
[1]:http://nvd.nist.gov/
|
||||
[2]:http://www.blackducksoftware.com/oss-logistics/secure
|
@ -0,0 +1,68 @@
|
||||
Disable / Password Protect Single User Mode / RHEL / CentOS / 5.x / 6.x
|
||||
================================================================================
|
||||
Hello All,
|
||||
|
||||
If you have not protected Single User Mode with Password then it is big risk for your Linux Server, So protecting Single User Mode with Password is very important when it comes to security,
|
||||
|
||||
Today in this article i will show you how you can protect Single User Mode with Password on RHEL / CentOS 5.x and RHEL / CentOS 6.x.
|
||||
|
||||
Please execute given commands carefully else your system will not boot properly. First i would request you to read full procedure and then try to follow. Do it at your own risk :-)
|
||||
|
||||

|
||||
Password Protect
|
||||
|
||||
### 1. For RHEL / CentOS 5.x ###
|
||||
|
||||
#### 1.1 Before doing anything please take backup of your /etc/inittab ####
|
||||
|
||||
cp /etc/inittab /etc/inittab.backup
|
||||
|
||||
**To Disable and Make Single User Mode Password Protected, Execute below command as root :-**
|
||||
|
||||
[root@tejas-barot-linux ~]$ sed -i '1i su:S:wait:/sbin/sulogin'
|
||||
|
||||
**So It will look like below**
|
||||
|
||||
su:S:wait:/sbin/sulogin
|
||||
# Default runlevel. The runlevels used by RHS are:
|
||||
# 0 - halt (Do NOT set initdefault to this)
|
||||
# 1 - Single user mode
|
||||
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
|
||||
# 3 - Full multiuser mode
|
||||
# 4 - unused
|
||||
# 5 - X11
|
||||
# 6 - reboot (Do NOT set initdefault to this)
|
||||
#
|
||||
id:3:initdefault:
|
||||
|
||||
*NOTE: If you do not want to use sed command then You can always add “su:S:wait:/sbin/sulogin” at top in /etc/inittab*
|
||||
|
||||
### 2. For RHEL / CentOS 6.x ###
|
||||
|
||||
#### 2.1 Before doing anything please take backup of your /etc/inittab ####
|
||||
|
||||
cp /etc/sysconfig/init /etc/sysconfig/init.backup
|
||||
|
||||
#### 2.2 To Disable and Make Single User Mode Password Protected, Execute below command as root :- ####
|
||||
|
||||
[root@tejas-barot-linux ~]$#sed -i 's/SINGLE=\/sbin\/sushell/SINGLE=\/sbin\/sulogin/' /etc/sysconfig/init
|
||||
|
||||
**So It will look like below**
|
||||
|
||||
SINGLE=/sbin/sulogin
|
||||
|
||||
*NOTE :- If you do not want to use sed command then You can always change to “SINGLE=/sbin/sulogin” in /etc/sysconfig/init*
|
||||
|
||||
Enjoy Linux :) Enjoy Open Source
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tejasbarot.com/2014/05/05/disable-password-protect-single-user-mode-rhel-centos-5-x-6-x/#axzz39oGCBRuX
|
||||
|
||||
作者:[Tejas Barot][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/+TejasBarot
|
128
sources/tech/20140811 Echo Command with Practical Examples.md
Normal file
128
sources/tech/20140811 Echo Command with Practical Examples.md
Normal file
@ -0,0 +1,128 @@
|
||||
Echo Command with Practical Examples
|
||||
================================================================================
|
||||
echo command is built in **shell command** , which is used to display the value of a **variable** or **print a line of text**.
|
||||
|
||||
Echo command plays a important role in building a shell script.
|
||||
|
||||
### Synatx : ###
|
||||
|
||||
# echo [Options] [String]
|
||||
|
||||
The items in square brackets are optional. A string can be defined as finite sequence of characters (like letters, numerals, symbols punctuation marks).
|
||||
|
||||
When echo command is used without any options or strings, echo returns a blank line on the display screen followed by the command prompt on the subsequent line. This is because pressing the ENTER key is a signal to the system to start a new line, and thus echo repeats this signal.
|
||||
|
||||
### Options : ###
|
||||
|
||||
|
||||
- -n do not output the trailing newline
|
||||
- -e enable interpretation of backslash escapes
|
||||
- -E disable interpretation of backslash escapes (default)
|
||||
|
||||
If -e is in effect, the following sequences are recognized:
|
||||
|
||||
- \\ backslash
|
||||
- \a alert (BEL)
|
||||
- \b backspace
|
||||
- \c produce no further output
|
||||
- \e escape
|
||||
- \f form feed
|
||||
- \n new line
|
||||
- \r carriage return
|
||||
- \t horizontal tab
|
||||
- \v vertical tab
|
||||
- \0NNN byte with octal value NNN (1 to 3 digits)
|
||||
- \xHH byte with hexadecimal value HH (1 to 2 digits)
|
||||
|
||||
### Example :1 Display the value of System Defined Variables ###
|
||||
|
||||
Using the set command , we can list the system define variables and to print the vaule of these variables we can use echo command :
|
||||
|
||||
jack@localhost:~$ echo $USER
|
||||
jack
|
||||
jack@localhost:~$ echo $HOME
|
||||
/home/jack
|
||||
|
||||
### Example:2 Display the value of User defined Variables : ###
|
||||
|
||||
jack@nextstep4it:~$ var1=`date`
|
||||
jack@nextstep4it:~$ echo "Today's date time is : $var1"
|
||||
Today's date time is : Mon Jul 28 13:11:37 IST 2014
|
||||
|
||||
### Example:3 Display the text String ###
|
||||
|
||||
jack@nextstep4it:~$ echo " Hi this echo command testing"
|
||||
Hi this echo command testing
|
||||
|
||||
### Example:4 Use of backspace in echo command ###
|
||||
|
||||
jack@nextstep4it:~$ echo -e "Ubuntu \bis \bthe \bbest \bDesktop \bOS"
|
||||
|
||||
Above Command will Print :
|
||||
UbuntuisthebestDesktopOS
|
||||
|
||||
### Example:5 Use of tab space in echo command ###
|
||||
|
||||
nextstep4it@nextstep4it:~$ echo -e "Ubuntu \tis \tthe \tbest \tDesktop \tOS"
|
||||
|
||||
Above command will show below output :
|
||||
|
||||
Ubuntu is the best Desktop OS
|
||||
|
||||
### Example:6 Use of Vertical tab in echo Command ###
|
||||
|
||||
jack@nextstep4it:~$ echo -e "Ubuntu \vis \vthe \vbest \vDesktop \vOS"
|
||||
Ubuntu
|
||||
is
|
||||
the
|
||||
best
|
||||
Desktop
|
||||
OS
|
||||
|
||||
### Example:7 Colored output of echo command ###
|
||||
|
||||
echo command can change the font style, background color of fonts and font colors. Escape sequence \033 can be used to alter font properties. -e option has to be used in order to the escape sequence be in effect. Some of escape codes are listed below :
|
||||
|
||||
- [0m: Normal
|
||||
- [1m: Bold fonts
|
||||
- [2m: Font color changes to Purple
|
||||
- [4m: Underlined fonts
|
||||
- [7m: Invert foreground and background colors
|
||||
- [8m: Invisible fonts
|
||||
- [9m: Cross lined fonts
|
||||
- [30m: Font color changes to Grey
|
||||
- [31m: Font color changes to Red
|
||||
- [32m: Font color changes to Green
|
||||
- [33m: Font color changes to Brown
|
||||
- [34m: Font color changes to Blue
|
||||
- [35m: Font color changes to Violet
|
||||
- [36m: Font color changes to Sky Blue
|
||||
- [37m: Font color changes to Light Grey
|
||||
- [38m: Font color changes to Black
|
||||
- [40m: Background color changes to Black
|
||||
- [41m: Background color changes to Red
|
||||
- [42m: Background color changes to Green
|
||||
- [43m: Background color changes to Brown
|
||||
- [44m: Background color changes to Blue
|
||||
- [45m: Background color changes to Violet
|
||||
- [46m: Background color changes to Sky Blue
|
||||
- [47m: Background color changes to Light Grey
|
||||
|
||||
Below command will print the output in red color.
|
||||
|
||||
jack@nextstep4it:~$ echo -e "\033[31mMagic of Linux\033[0m"
|
||||
Magic of Linux
|
||||
|
||||
Below Command will print “Magic of Linux” in bold style and red background color.
|
||||
|
||||
nextstep4it@nextstep4it:~$ echo -e "\033[1m\033[41mMagic of Linux\033[0m"
|
||||
Magic of Linux
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.nextstep4it.com/categories/unix-command/echo-command/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user