Warning: Use of undefined constant BLOGUPLOADDIR - assumed 'BLOGUPLOADDIR' (this will throw an Error in a future version of PHP) in /home/enadeg5/public_html/wp-content/themes/Avada/framework/plugins/revslider/inc_php/base.class.php on line 71

Warning: Declaration of Post_Types_Order_Walker::start_lvl(&$output, $depth) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /home/enadeg5/public_html/wp-content/themes/Avada/framework/plugins/post-types-order/post-types-order.php on line 344

Warning: Declaration of Post_Types_Order_Walker::end_lvl(&$output, $depth) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /home/enadeg5/public_html/wp-content/themes/Avada/framework/plugins/post-types-order/post-types-order.php on line 344

Warning: Declaration of Post_Types_Order_Walker::start_el(&$output, $page, $depth, $args) should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /home/enadeg5/public_html/wp-content/themes/Avada/framework/plugins/post-types-order/post-types-order.php on line 344

Warning: Declaration of Post_Types_Order_Walker::end_el(&$output, $page, $depth) should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /home/enadeg5/public_html/wp-content/themes/Avada/framework/plugins/post-types-order/post-types-order.php on line 344

Warning: Cannot modify header information - headers already sent by (output started at /home/enadeg5/public_html/wp-content/themes/Avada/framework/plugins/revslider/inc_php/base.class.php:71) in /home/enadeg5/public_html/wp-includes/feed-rss2.php on line 8
Unix/Linux – The IP Zone http://theipzone.com Zone for Computer Network Engineers Thu, 26 Sep 2013 01:25:21 +0000 en-US hourly 1 https://wordpress.org/?v=5.7.11 Switching To Ubuntu http://theipzone.com/blog/2013/09/26/switching-to-ubuntu/ http://theipzone.com/blog/2013/09/26/switching-to-ubuntu/#respond Thu, 26 Sep 2013 01:22:00 +0000 http://theipzone.com/?p=89 Table of Equivalent Commands Below is a table of equivalent commands for package management on both Ubuntu/Debian and Red Hat/Fedora systems. Task Red Hat/Fedora Ubuntu Adding, Removing and Upgrading Packages Refresh list of available packages Yum refreshes each time it’s used apt-get update Install a package from a repository yum install package_name apt-get install package_name Install a package file yum install package.rpm rpm -i package.rpm dpkg –install package.deb Remove a package rpm -e package_name apt-get remove package_name Check for package upgrades yum check-update apt-get -s upgrade apt-get -s dist-upgrade Upgrade packages yum update rpm -Uvh [args] apt-get upgrade Upgrade the entire system yum upgrade apt-get dist-upgrade Package Information Get information about an available package yum search package_name apt-cache search package_name Show available packages yum list available apt-cache dumpavail List all installed packages yum list installed rpm -qa dpkg –list Get information about a package yum info package_name apt-cache show package_name Get information about an installed package rpm -qi package_name dpkg –status package_name List files in an installed package rpm -ql package_name dpkg –listfiles package_name List documentation files in an installed package rpm -qd package_name – List configuration files in an installed package rpm -qc package_name dpkg-query –show -f ‘${Conffiles}\n’package_name Show the packages a given package depends on rpm -qR package_name apt-cache depends Show other packages that depend on a given package (reverse dependency) rpm -q -whatrequires [args] apt-cache rdepends Package File Information Get information about a package file rpm -qpi package.rpm dpkg –info package.deb List files in a package file rpm -qpl package.rpm dpkg –contents package.deb List documentation files in a package file rpm -qpd package.rpm – List configuration files in a package file rpm -qpc package.rpm – Extract files in a package rpm2cpio package.rpm | […]

The post Switching To Ubuntu appeared first on The IP Zone.

]]>
Table of Equivalent Commands

Below is a table of equivalent commands for package management on both Ubuntu/Debian and Red Hat/Fedora systems.

Task

Red Hat/Fedora

Ubuntu

Adding, Removing and Upgrading Packages

Refresh list of available packages

Yum refreshes each time it’s used

apt-get update

Install a package from a repository

yum install package_name

apt-get install package_name

Install a package file

yum install package.rpm 
rpm -i package.rpm

dpkg –install package.deb

Remove a package

rpm -e package_name

apt-get remove package_name

Check for package upgrades

yum check-update

apt-get -s upgrade
apt-get -s dist-upgrade

Upgrade packages

yum update
rpm -Uvh [args]

apt-get upgrade

Upgrade the entire system

yum upgrade

apt-get dist-upgrade

Package Information

Get information about an available package

yum search package_name

apt-cache search package_name

Show available packages

yum list available

apt-cache dumpavail

List all installed packages

yum list installed
rpm -qa

dpkg –list

Get information about a package

yum info package_name

apt-cache show package_name

Get information about an installed package

rpm -qi package_name

dpkg –status package_name

List files in an installed package

rpm -ql package_name

dpkg –listfiles package_name

List documentation files in an installed package

rpm -qd package_name

List configuration files in an installed package

rpm -qc package_name

dpkg-query –show -f ‘${Conffiles}\n’package_name

Show the packages a given package depends on

rpm -qR package_name

apt-cache depends

Show other packages that depend on a
given package (reverse dependency)

rpm -q -whatrequires [args]

apt-cache rdepends

Package File Information

Get information about a package file

rpm -qpi package.rpm

dpkg –info package.deb

List files in a package file

rpm -qpl package.rpm

dpkg –contents package.deb

List documentation files in a package file

rpm -qpd package.rpm

List configuration files in a package file

rpm -qpc package.rpm

Extract files in a package

rpm2cpio package.rpm | cpio -vid

dpkg-deb –extract package.deb dir-to-extract-to

Find package that installed a file

rpm -qf filename

dpkg –search filename

Find package that provides a particular file

yum provides filename

apt-file search filename

Misc. Packaging System Tools

Show stats about the package cache

apt-cache stats

Verify all installed packages

rpm -Va

debsums

Remove packages from the local cache directory

yum clean packages

apt-get clean

Remove only obsolete packages from the local cache directory

apt-get autoclean

Remove header files from the local cache directory
(forcing a new download of same on next use)

yum clean headers

apt-file purge

General Packaging System Information

Package file extension

*.rpm

*.deb

Repository location configuration

/etc/yum.conf

/etc/apt/sources.list

Some of the information in this table was derived (with permission) from APT and RPM Packager Lookup Tables.

 

Below is a table of example commands for managing services. The apache/httpd service is used as an example.

Task

Red Hat / Fedora

Ubuntu

Ubuntu 
(with sysv-rc-conf or sysvconfig)

Starting/stopping services immediately

service httpd start

invoke-rc.d apache start

service apache start

Enabling a service at boot

chkconfig httpd on

update-rc.d apache defaults

sysv-rc-conf apache on

Disabling a service at boot

chkconfig httpd off

update-rc.d apache purge

sysv-rc-conf apache off

Note: Whereas Red Hat and Fedora servers boot into runlevel 3 by default, Ubuntu servers default to runlevel 2.

Note: The service and invoke-rc.d commands call init scripts to do the actual work. You can also start and stop services by doing e.g. /etc/init.d/apache start on Ubuntu, or /etc/init.d/httpd start on Red Hat/Fedora.

 

Source:

https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora

The post Switching To Ubuntu appeared first on The IP Zone.

]]>
http://theipzone.com/blog/2013/09/26/switching-to-ubuntu/feed/ 0
TMUX http://theipzone.com/blog/2013/08/16/tmux/ http://theipzone.com/blog/2013/08/16/tmux/#respond Fri, 16 Aug 2013 18:51:00 +0000 http://theipzone.com/?p=54 Shell CMDS – From any shell prompt: start new:tmux start new with session name:tmux new -s myname attach:tmux a  #  (or at, or attach) attach to named:tmux a -t myname list sessions:tmux ls kill session:` TMUX CMDS – In tmux, hit the prefix ctrl+b and then: Sessions :new<CR>  new sessions  list sessions$  name session Windows (tabs) c  new windoww  list windowsf  find window,  name window&  kill window Panes (splits) %  vertical split”  horizontal splito  swap panesq  show pane numbersx  kill pane+  break pane into window (e.g. to select text by mouse to copy)–  restore pane from window⍽  space – toggle between layoutsPREFIX q (Show pane numbers, when the numbers show up type the key to goto that pane)PREFIX { (Move the current pane left)PREFIX } (Move the current pane right) Resizing Panes You can also resize panes if you don’t like the layout defaults. I use the mouse to resize PREFIX : resize-pane (By default it resizes the current pane down)PREFIX : resize-pane -U (Resizes the current pane upward)PREFIX : resize-pane -L (Resizes the current pane left)PREFIX : resize-pane -R (Resizes the current pane right)PREFIX : resize-pane 20 (Resizes the current pane down by 20 cells)PREFIX : resize-pane -U 20 (Resizes the current pane upward by 20 cells)PREFIX : resize-pane -L 20 (Resizes the current pane left by 20 cells)PREFIX : resize-pane -R 20 (Resizes the current pane right by 20 cells)PREFIX : resize-pane -t 2 20 (Resizes the pane with the id of 2 down by 20 cells)PREFIX : resize-pane -t -L 20 (Resizes the pane with the id of 2 left by 20 cells) Misc d  detacht  big clock?  list shortcuts:  prompt z zoom How do I copy and paste when the mouse […]

The post TMUX appeared first on The IP Zone.

]]>
Shell CMDS – From any shell prompt:

start new:
tmux

start new with session name:
tmux new -s myname

attach:
tmux a  #  (or at, or attach)

attach to named:
tmux a -t myname

list sessions:
tmux ls

kill session:
`

TMUX CMDS – In tmux, hit the prefix ctrl+b and then:

Sessions

:new<CR>  new session
s  list sessions
$  name session

Windows (tabs)

c  new window
w  list windows
f  find window
,  name window
&  kill window

Panes (splits)

%  vertical split
”  horizontal split
o  swap panes
q  show pane numbers
x  kill pane
+  break pane into window (e.g. to select text by mouse to copy)
–  restore pane from window
  space – toggle between layouts
PREFIX q (Show pane numbers, when the numbers show up type the key to goto that pane)
PREFIX { (Move the current pane left)
PREFIX } (Move the current pane right)

Resizing Panes

You can also resize panes if you don’t like the layout defaults. I use the mouse to resize

PREFIX : resize-pane (By default it resizes the current pane down)
PREFIX : resize-pane -U (Resizes the current pane upward)
PREFIX : resize-pane -L (Resizes the current pane left)
PREFIX : resize-pane -R (Resizes the current pane right)
PREFIX : resize-pane 20 (Resizes the current pane down by 20 cells)
PREFIX : resize-pane -U 20 (Resizes the current pane upward by 20 cells)
PREFIX : resize-pane -L 20 (Resizes the current pane left by 20 cells)
PREFIX : resize-pane -R 20 (Resizes the current pane right by 20 cells)
PREFIX : resize-pane -t 2 20 (Resizes the pane with the id of 2 down by 20 cells)
PREFIX : resize-pane -t -L 20 (Resizes the pane with the id of 2 left by 20 cells)

Misc

d  detach
t  big clock
?  list shortcuts
:  prompt
z zoom

How do I copy and paste when the mouse select plane is enabled?
To copy/paste text in xterm running tmux on mac you simply hold down the option key and highlight the text you want to copy. On PC you hold down the shift key. If you are running split plane windows then you can zoom into the window you are interesting in copying text from using C-b z (prefix: z)

If you are a mac user an easier approach is to use Iterm2 and then under the preference, go to the general tab and check the allow clipboard access to terminal apps.

 

CONFIGURATIONS OPTIONS:
# Just click it
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-resize-pane on

# Sane scrolling
set -g mode-mouse on

# Set the base index for windows to 1 instead of 0
set -g base-index 1

# Set the base index for panes to 1 instead of 0
setw -g pane-base-index 1

# set colors for the active window
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright

# pane colors
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg red

# Command / message line
set -g message-fg white
set -g message-bg black
set -g message-attr bright

# better mnemonics for splitting panes!
bind | split-window -h
bind \ split-window -h
bind – split-window -v
bind _ split-window -v

# Justify Status bar
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on

# toggle statusbar
bind-key s set status

# scrollback buffer n lines
set -g history-limit 10000

# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on

# reload settings
bind-key R source-file ~/.tmux.conf

# tell tmux to use 256 colour terminal
set -g default-terminal “screen-256color”

# instructs tmux to expect UTF-8 sequences
setw -g utf8 on

# listen for activity on all windows
set -g bell-action any

# open a man page in new window
bind-key / command-prompt “split-window ‘exec man %%'”

# Broadcast input
bind-key S setw synchronize-panes

 

Source:
http://blog.yjl.im/2009/11/migrating-to-tmux-from-gnuscreen.html
http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/
http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
http://www.dayid.org/os/notes/tm.html
https://gist.github.com/shinzui/866897
https://gist.github.com/MohamedAlaa/2961058

 

 

The post TMUX appeared first on The IP Zone.

]]>
http://theipzone.com/blog/2013/08/16/tmux/feed/ 0