分类 Arch Linux 下的文章

为ArchLinux安装Linux-ck内核

1. 简介

Linux-ck是 AUR 中的一个包,在非官方 linux-ck 源中允许用户运行一个定制的内核/头文件,基于 Con Kolivas 的 ck1 补丁集,包括 Brain Fuck Scheduler (BFS)。许多 Archer 选择使用这个包,因为 BFS 在任意负载状况下都具有优异的桌面交互性能和敏捷反应特性。

2. 安装

  • 添加源到  /etc/pacman.conf (我把这个条目放在文件末尾):

[repo-ck] 
Server = http://repo-ck.com/$arch 
  • 添加验证Key  

# pacman-key -r 5EE46C4C && pacman-key --lsign-key 5EE46C4C
  • 通过  pacman -Syy  刷新 

  • 直接用 Pacman 安装包: 

# pacman -S linux-ck linux-ck-headers 

3. 添加引导项目到Grub

通过以下命令, 重新编译  /boot/grub/grub.cfg

# grub-mkconfig -o /boot/grub/grub.cfg

linux下升级Python至2.x的最新版

简介

  • 之所以是2.x的最新版,而不是最新版,原因有很多,不过最大的原因还是兼容问题,以及以及软件库的可用量问题。
  • 显然2.x就像是Windows,而3.x就像是linux(当然这个比喻或许有点不恰当。linux的应用对比Windows来说不会少太多。)
  • 虽然性能优异,但是3.x的应用库还是略显稀少多数第三方库都还在使用2.x版本的Python。

步骤如下

1. 下载:

$ wget -c https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz

2. 解压

$ tar zxvf Python-2.7.9.tgz

3. 安装

# cd Python-2.7.9 && ./configure  && make && make install

1. 注意,这个是覆盖安装,如果有更多老版本需求,建议在configure 后面添加路径参数,如:–prefix=/usr/python27

  2. use root to install it! 

4. 看看成果吧。python v2.7.9

python -V


Install PIP

https://pip.pypa.io/en/latest/installing.html

# curl -O https://bootstrap.pypa.io/get-pip.py
# python get-pip.py

Angry IP Scanner: Scan IP Addresses And Ports For Analyzing Networks

Angry IP Scanner, also known as ipscan, is an open source network scanning tool that can be used to scan the ip addresses and ports on your network. It supports Linux, Windows, MAc OSX and other platforms. It has designed to be fast and simple to use. It has been used by Network administrators on almost all organizations.

Features

- Lightweight and cross-platform.
– Scans ip addresses in any range.
– Doesn’t require any installation
– Check for ip address if it is alive.
– Resolves hostnames, determines ip addresses and scans ports.
– Multi-threaded support to speed up scanning process.

Installation

As i mentioned before, we don’t have to install it. All we need is our system should have installed with Oracle java or openjdk. Just download the ipscan jar file and run it with command:

# java -jar ipscan.x.x.jar

Also you can install it if you wish. Just download deb/rpm packages and install as described below.

Hence all modern operating system comes with openjdk in their default repositories, we don’t have to worry about openjdk installation.

First install openjdk using command:

On Debian/Ubuntu:

$ sudo apt-get install openjdk-7-jdk

On RHEL/CentOS:

# yum install java-1.7.0-openjdk

Then grab Angry IP Scanner latest version from here depending upon your platform and  architecture.

After downloading it, go to the directory where you have downloaded and install it using command:

On Debian/Ubuntu:

$ sudo dpkg -i ipscan_3.2.1_*.deb

On RHEL/CentOS:

[[email protected] ~]# rpm -Uvh /ipscan-3.2.1-*.rpm

Launch Angry IP Scanner

After installing, launch it either from Menu or Dash. At the first launch, you’ll pleased with Getting Started screen. You can read it by clicking on the Next button or click Close to exit Getting Started screen.

IP Range - Angry IP Scanner _001By default, your local ip address is selected. You can specify other ip addresses as well to start scan.

IP Range - Angry IP Scanner _002

Scan Local System

Let us start with local system ip address. Click Start to scan. After a couple of seconds, you will get the Scan Statistics like below.

Scan Statistics _003To view the hostname, ports of the system, just double click on the ip address. You will get the details as shown here.

IP address details _006Scan ‘n’ number of  system

In the above test, we scanned only single system, i.e I entered the the same ip address on IP Range boxes. Now let me scan some remote systems on my network. Say for example, let us scan systems whose has ip address between 192.168.1.100 to 192.168.1.110.

Enter ip addresses 192.168.1.100 and 192.168.1.110 in the from and to column boxes of IP Range and click Start button.

Now you’ll see the list of alive hosts in the range of network that you have entered.

IP Range - Angry IP Scanner _007As you see in the above statistics, i have two hosts running on my network. Pretty easy, isn’t?

More Commands

Not only it displays the alive hosts in your network, also it will allow you to manage the remote systems. Let us see how.

Let us say you want to ssh to a system on your network. Just right click on the ip address, go to Open and select SSH. Alternatively you can open it from Menu bar. Click on the Commands button on the menu bar and go to Open -> SSH.

Menu_010A new small window will appear and will ask the password the password to log in to the system. Enter it and you’re in business. Now you should be able to ssh to your remote system.

sk@server:~_011Be mindful that, your remote server have SSH installed, otherwise you won’t be able to connect via ssh. Like this way, you can do various commands such as ftp, trace route, telnet etc.

While testing this app, i found myself, it will be quite useful for Network administrators. It is simple, but powerful and it does the job as advertised. Hope it will be useful for you.

Good luck!

Why Should You Put Linux In Your Computer

My life has changed quite alot since the day I switched to Ubuntu, a friendly Linux distribution with more than twenty million users around the world. I feel smarter, stronger and I am happier than ever before. At the beginning, it wasn’t easy, instead it was very hard.

The first thing that came into my mind after I did a fresh installation of Ubuntu Linux was: how am I going to use this thing that I have never seen before in my life  and have absolutely no idea what it is.

To be honest with you guys when I first started using Linux I did not even know how to delete files and was very careful in every action or mouse click I made.

I was used to Recycle Bin on my old Windows machine and never heard about Trash before. I started digging information into websites and asking in forums how to delete files in Linux.

Many answers popped up!

Oww!!! It was amazing! It was my first day using Linux and I was surprised by the amount of Linux users that were trying to help me for free until I had a solution in my hands.

Linux Has a Great Community

So the first reason that you should take in consideration when thinking to switch to Linux or not, is the great and warm community that Linux has. Computer geeks, creators and builders from all over the world contribute their energy to build better open sourcesoftware, Linux distributions for everyone and for any kind of machine you can can name in planet earth and what it most important these guys work to find new efficient cheap solutions.

I am very sure that if you start using Linux you will feel a freedom that it was missing before and you had no idea that such thing existed.

Linux is freedom!

Someone writes blogs and Linux tutorials to help, someone writes shell scripts so others can use to make their life easier and some stay online on IRC channels to answer your questions about Linux.

If you have a problem with your Linux machine, chances are that it will be solved very fast. We will help you, they will help you, everybody in the Linux community is contributing in his/her own way.

You Can Use Linux From GUI

The first thing most of the people think when they heard the word Linux is the terminal, a tool that only weird geeks and nerds that live in their basement with their computers can use.

Of course that the command line is a powerful tool and learning it is a skill that everyone admires, but it is completely not true anddesinformative  that you need to know commands in order to use a Linux distribution.

“Don’t try Linux!” “It is scary, only geeks use it!” “You have to learn a ton of crazy commands to work on that operating system.” “These people install software by typing commands in their machines, are they crazy?”

That’s what people would say to you. But, I do not blame them because they have been left in a dark, they have been used to it and they hate the light.

They have no idea about Linux, so how can we expect from the to like it if they have never or seen tried it? We as Linux people, contributors and builders should help them understand Linux and teach them Linux.

I am thinking to teach Linux to my little sister. It is also a very good idea to teach Linux to kids, because they are the future of this world. To me, a world with more Linux people means a better world.

To use a Linux distribution, you don’t need to know anything about commands and terminals. If you do it is ok, it does not hurt anyone, instead it helps you alot.

You can use Linux like you use any operating system that has a graphical user interface. You have a mouse, you can do single clicks and double clicks. Like in Windows guys!

Am I clear enough, or should I continue to explain and give you more arguments that you don’t have to be some type of computer nerd or crazy to use Linux?

Linux Is Open Source And Free

What does the fact that Linux is open source mean? It means that its code is distributed so everyone can see, use, modify for his/her own use and projects and share with others.

I feel safe to use Linux because people cannot hide backdoors on it to spy my data and invade my privacy. Everything is open, everyone can see it.

If someone tries to put a backdoor in Linux, people will learn about it, but can you say the same for Mac OS X  or Windows operating system?

I am not trying to say that they have backdoord, I am just saying that their code is closed. Maybe it is ok for you because it seems very technical to know such thing, but believe me it is not.

It is not about Linux or windows,  it is about your freedom. Read more about Linux,  get a fresh Linux distro on the internet and take your freedom back again.

Note: I have nothing against Windows or Mac OS X because I am a computer geek and an explorer so I like to use them. But when it comes to freedom I choose Linux.

Do you know what the best part is? You don’t have to pay a dollar to use a Linux distribution. Every Linux distribution I have tried is free and believe me there so many that you would need year to use them all.

There Is A Linux Distribution For Everyone

There are many specific Linux distributions available for download  that can help in many areas such educationeconomyserversand computer security.

Education

1. Trisquel GNU/Linux

Trisquel GNU/Linux is a 100% libre Ubuntu-based Linux distribution. Its main purpose is to provide an operating system for varied audiences, including home and office users, educational institutions, multimedia workstations, etc.

2. Edubuntu

Edubuntu is a partner project of Ubuntu, a distribution suitable for classroom use. The aim is that an educator with limited technical knowledge and skill will be able to set up a computer lab, or establish an on-line learning environment, in an hour or less, and then administer that environment without having to become a fully-fledged Linux geek.

3. UberStudent

UberStudent is an Ubuntu-based distribution on a DVD designed for learning and teaching academic computing in the higher education and advanced secondary levels. UberStudent comes with software for everyday computing tasks, plus a core set of programs and features designed to teach and make easier the tasks and habits common to high-performing students of all academic disciplines.

Gaming

1. SteamOS

SteamOS is a Debian-based Linux distribution designed to run Valve’s Steam and Steam games. It also provides a desktop mode (GNOME) which can run regular Linux applications. In addition to a stable Debian base, SteamOS features various third-party drivers and updated graphics stack, a newer Linux kernel with long-term support, and a custom graphics compositor designed to provide a seamless transition between Steam, its games and the SteamOS system overlay. The base operating system is open-source software, but the Steam client is proprietary.

2. LinuxConsole

LinuxConsole is an independently developed Linux live CD with different editions designed for desktops, servers, gaming consoles, and old computers. Its primary characteristics are easy installation, extensive choice of software in the form of modules, and excellent hardware detection.

Security And Penetration Testing

If you are interested in learning computer security and penetration testing, then you should check the following Linux distributions.

1. Kali Linux

Kali Linux (formerly known as BackTrack) is a Debian-based distribution with a collection of security and forensics tools. It features timely security updates, support for the ARM architecture, a choice of four popular desktop environments, and seamless upgrades to newer versions.

2. BackBox Linux

BackBox Linux is an Ubuntu-based distribution developed to perform penetration tests and security assessments. It is designed to be fast and easy to use. It provides a minimal yet complete desktop environment, thanks to its own software repositories, which are always updated to the latest stable versions of the most often used and best-known ethical hacking tools.

3. CAINE

CAINE (Computer Aided INvestigative Environment) is an Ubuntu-based GNU/Linux live distribution created as a project of digital forensics. It offers a complete forensic environment that is organized to integrate existing software tools as software modules and to provide a friendly graphical interface. The main design objectives that CAINE aims to guarantee are: an interoperable environment that supports the digital investigator during the four phases of the digital investigation, a user-friendly graphical interface, and a semi-automated compilation of the final report.

4. Matriux

Matriux is a Debian-based security distribution designed for penetration testing and forensic investigations. Although it is primarily designed for security enthusiasts and professionals, it can also be used by any Linux user as a desktop system for day-to-day computing. Besides standard Debian software, Matriux also ships with an optimized GNOME desktop interface, over 300 open-source tools for penetration testing, and a custom-built Linux kernel.

5. Swift Linux

Swift Linux is a lightweight, Debian and Linux Mint-based distribution featuring the IceWM window manager. Compared to its parent, Swift Linux includes extra applications, such as BleachBit (a tool for freeing up space and clearing private information), the LibreOffice office suite, and a wide variety of forensic analysis and data recovery utilities.

6. NetSecL OS

NetSecL is a security-focused distribution and live DVD based on openSUSE (starting from version 3.0, previous versions were based on Slackware Linux). To improve the security aspect of the distribution, servers have been removed, incoming ports closed and services turned off. Additionally, several penetration tools have been included.

7. DEFT Linux

DEFT (Digital Evidence & Forensic Toolkit) is a customized distribution of the Ubuntu live Linux CD. It is an easy-to-use system that includes excellent hardware detection and some of the best open-source applications dedicated to incident response and computer forensics.

8. ForLEx

ForLEx is a lightweight Debian-based Linux live CD which boots into an LXDE desktop. The distribution’s primary goal is to provide several useful utilities for forensic analysis.

Old Computers

Do you have an old machine abandoned in the dust because you can not find the appropriate operating system to power it up and there is no software for it at all?

There are many small and light Linux distributions that can be used to give life to old computers. Tiny Core Linux is one of them. It is only 12 MB, runs entirely in memory and boots very quickly.

The followings are some Linux distributions that you can use in your old computers.

1. Puppy Linux

Puppy Linux is yet another Linux distribution. What’s different here is that Puppy is extraordinarily small, yet quite full-featured. Puppy boots into a ramdisk and, unlike live CD distributions that have to keep pulling stuff off the CD, it loads into RAM. This means that all applications start in the blink of an eye and respond to user input instantly. Puppy Linux has the ability to boot off a flash card or any USB memory device, CDROM, Zip disk or LS/120/240 Superdisk, floppy disks, internal hard drive. It can even use a multisession formatted CD-RW/DVD-RW to save everything back to the CD/DVD with no hard drive required at all.

2. CrunchBang Linux

CrunchBang Linux is a Debian-based distribution featuring the lightweight Openbox window manager and GTK+ applications. The distribution has been built from a minimal Debian system and customized to offer a good balance of speed and functionality. CrunchBang Linux is currently available as a live CD; however, the best performance is achieved by installing it to a hard disk.

3. Lubuntu

Lubuntu is a fast, lightweight and energy-saving variant of Ubuntu using the LXDE (Lightweight X11 Desktop Environment) desktop. It is intended to have low-resource system requirements and is designed primarily for netbooks, mobile devices and older PCs.

Software And Updates Are Free

Most of the software used in Linux distributions is free. There are many developers, fans and geeks that contribute their knowledge and skills through their code in open source and free tools for all Linux people.

It is the user that decides what kind of software should come installed by default with the Linux distribution and not the creator and the maintainers of it.

Linux people, discuss ideas about software and many other things in IRC channels, blogs, mail lists, forums, meetings and big conferences.

Being a student it is very hard to pay for software. And when it comes to updates it really hurts. They  are very important for your system security, software performance  and make the system cooler with new features.

Thanks to Linux I don’t have to pay for software and updates. And believe me it is freedom!

Conclusion

There are many other reasons why one should put Linux on his/her machine, but I think I gave enough reasons and nice arguments to people that have not heard about Linux before or have not tried it.

Linux Basics: du Command Usage

Today we will discuss about how to find or summarize the disk usage on Unix/Linux systems using the du command. du stands forDisk Usage. In this handy tutorial, let us see how to use du command in real time.

Syntax

du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F

Usage

Let us see some practical examples. In this tutorial, I will be using /home/sk/unixmen/ directory to test du command. The /home/sk/unixmen directory contains the following content.

$ ls /home/sk/unixmen/ Akon - So Blue.mp4 panel.zip Senthilkumar_Resume.pdf sk.txt Ubuntu 13.10

1. Find Disk Usage with out any options

Entering the du command without any parameters will display following result.

$ du /home/sk/unixmen/

Sample output:

673800    /home/sk/unixmen/Ubuntu 13.10
679084    /home/sk/unixmen/

By default, du command displays the result in Kilobytes.

2. Display Disk Usage including all files and folders

As you see in the above result, If you execute du command without any parameters, it will display disk usage occupied by the directories only. So, If you want to find the disk usage of all files and directories, use -a flag.

$ du -a /home/sk/unixmen/

Sample output:

516    /home/sk/unixmen/panel.zip
4672    /home/sk/unixmen/Akon - So Blue.mp4
0    /home/sk/unixmen/sk.txt
673796    /home/sk/unixmen/Ubuntu 13.10/ubuntu-13.10-server-i386.iso
673800    /home/sk/unixmen/Ubuntu 13.10
92    /home/sk/unixmen/Senthilkumar_Resume.pdf
679084    /home/sk/unixmen/

3. Display Disk Usage in human readable format

As you see in the above outputs, the disk usage size is shown as some random numbers (679084) which is difficult to understand the exact size, atleaset for beginners. So let us display the disk usage size in human readable format such as in KB, MB, GB etc.

To calculate the disk usage in human readable format, use -h flag.

$ du -ah /home/sk/unixmen/

Sample Output:

516K    /home/sk/unixmen/panel.zip
4.6M    /home/sk/unixmen/Akon - So Blue.mp4
0    /home/sk/unixmen/sk.txt
659M    /home/sk/unixmen/Ubuntu 13.10/ubuntu-13.10-server-i386.iso
659M    /home/sk/unixmen/Ubuntu 13.10
92K    /home/sk/unixmen/Senthilkumar_Resume.pdf
664M    /home/sk/unixmen/

Now you can easily understand the disk usage sizes displayed in KB, MB, or GB format.

4. Display Disk Usage in MB or GB only

To display the disk usage of files and directories in Megabytes, or Gigabytes, use the parameter -B followed by M or G.

To display disk usage in Megabytes, enter the following command:

$ du -BM /home/sk/unixmen/

Sample output:

659M    /home/sk/unixmen/Ubuntu 13.10
664M    /home/sk/unixmen/

To display disk usage in Gigabytes, enter the following command:

$ du -BG /home/sk/unixmen/

Sample output:

1G    /home/sk/unixmen/Ubuntu 13.10
1G    /home/sk/unixmen/

5. Display Total Disk Usage

To display the total disk usage of files and directories, use -c option.

$ du -c /home/sk/unixmen/

Sample output:

673800    /home/sk/unixmen/Ubuntu 13.10
679084    /home/sk/unixmen/
679084    total

6. Display Total Disk Usage only

The previous command with -c option displays total size of the Disk Usage along with directories. If you want to skip all the results, and to display the total disk usage only, then use -s option.

$ du -s /home/sk/unixmen/

Sample output:

679084    /home/sk/unixmen/

To display the same result in human readable format, use -h option along with -s option.

$ du -sh /home/sk/unixmen/

Sample output:

664M    /home/sk/unixmen/

7. Display Disk Usage by excluding particular file types

Want to display the disk usage by excluding particular file types? For example, here we will summarize the disk usage result by excluding zip files.

$ du -h --exclude=*.zip* /home/sk/unixmen/

Sample output:

659M    /home/sk/unixmen/Ubuntu 13.10
663M    /home/sk/unixmen/

8. Display the Disk Usage by modification time

Do you want to display the disk usage by the modification time of files and directories? If yes, use –time option.

$ du -h --time /home/sk/unixmen/

Sample output:

659M    2014-02-25 17:56    /home/sk/unixmen/Ubuntu 13.10
664M    2014-02-25 17:56    /home/sk/unixmen/

I hope you get the enough details and usage of du command. For more advanced details, please refer the man pages.

$ man du

Cheers!

最新文章

最近回复

  • 测试: 评论测试内容
  • 袅残烟: [嘻嘻]万网域名也降价了
  • yxy: 以后,我会经常来逛的。
  • 袅残烟: LXDE可以搭配xf...
  • Fooleap: 从好几年前用 Lub...

分类

  • 默认分类 (26)
  • 运维 (53)
  • docker (1)
  • 动漫 (19)
  • 科普知识 (15)
  • 苍白边缘 (17)
  • 资源 (12)
  • Linux (58)
  • Arch Linux (19)
  • 计算机 (18)
  • 编程 (3)
  • Java (4)
  • python (0)
  • php (0)
  • 前端 (1)
  • 公告 (1)
  • 归档




      其它