Articles tagged with: Linux Administration

Centos Sıkılaştırma

  • Proxy kullanılıyor ise tanımlanır:

export http_proxy=http://proxyserver:portnumber
export https_proxy=http://proxyserver:portnumber
export ftp_proxy=http://proxyserver:portnumber

  • Update yapılır:

yum update -y

  • ssh ayarları yapılır:

Loading

Change or setup default gateway with route command in linux

$ /sbin/route -n

Output:

Kernel IP routing table
Destination           Gateway              Genmask                 Flags       Metric        Ref       Use         Iface
191.255.255.0     0.0.0.0                  255.255.255.0       U             0                0           0            eth0
169.254.0.0         0.0.0.0                  255.255.0.0           U             0                0           0            eth0
0.0.0.0                 191.255.255.1     0.0.0.0                    UG           0                0           0            eth0

Please note that a destination entry 0.0.0.0 (or default) is the default gateway.
In above example 191.255.255.1 is a default gateway.

Loading

Virtualbox installation error on ubuntu “Kernel driver not installed (rc=-1908)”

Easy way to install virtualbox on Ubuntu

root:~# sudo dpkg-reconfigure virtualbox-dkms dpkg-query

dpkg-query: package ‘virtualbox-dkms’ is not installed and no information is available
Use dpkg –info (= dpkg-deb –info) to examine archive files,
and dpkg –contents (= dpkg-deb –contents) to list their contents.
/usr/sbin/dpkg-reconfigure: virtualbox-dkms is not installed

Loading

Permission Modes in Linux

   8             5              5
user      group      world
r+w+x r+x r+x
4+2+2 4+0+1 4+0+1 = 855

The permission mode is computed by adding up the following values for the user, the file group, and for everyone else. The diagram shows how.
▪ Read 4 – Allowed to read files
▪ Write 2 – Allowed to write/modify files
▪ Execute 1 – Read/write/delete/modify/directory

    7             4              4
user      group      world
r+w+x r r
4+2+1 4+0+0 4+0+0 = 744

Loading

Find any word in linux system

I want to find in my linux system for example, “welcome to” the word. I’m doing the following on the command line for this query.

grep -r -e “Welcome to” /opt/otrs/

Output screen:

/opt/otrs/Kernel/Language/sl.pm:                ‘Welcome to %s’ => ‘Dobrodošli na %s’,
/opt/otrs/Kernel/Language/et.pm:                ‘Welcome to %s’ => ‘Tere tulemast %s’,
/opt/otrs/Kernel/Language/ar_SA.pm:        ‘Welcome to %s’ => ‘مرحباً بك في %s’,
/opt/otrs/Kernel/Language/lt.pm:                 ‘Welcome to %s’ => ‘Sveiki atvykę į %s’,
/opt/otrs/Kernel/Language/sk_SK.pm:       ‘Welcome to %s’ => ‘Vitajte v %’,
/opt/otrs/Kernel/Language/ru.pm:               ‘Welcome to %s’ => ‘Добро пожаловать в %s’,
/opt/otrs/Kernel/Language/hu.pm:              ‘Welcome to %s’ => ‘Üdvözli az %s’,
/opt/otrs/Kernel/Language/ca.pm:              ‘Welcome to %s’ => ‘Benvingut a %s’,

Then find related link. Doing the required correction with the help of an editor.

vi /opt/otrs/Kernel/Language/sl.pm

Loading

sudoedit (şifresiz root kullanıcısı olma )

Aşağıdaki komut ile sudo dosyası açılır

root#sudoedit /etc/sudoers

daha sonra dosyaya aşağıdaki satır eklenir

[kullanici adi]              ALL=(ALL)       NOPASSWD: ALL

Daha sonra sudo -s veya sudo su – ile şifresiz root olunur.

Loading

route add in Linux

route add -net networkaddress netmask 255.255.255.0 gw gateway ip

or only one host

route add -host networkaddress netmask 255.255.255.255 gw gateway ip

color red: change your own ip address

Loading

Copy file to remote computer on Centos

Remote to local copy

#scp -P 22 remote_IP:/home/myfile.gz . (. meaning local current folder)

Local to remote copy

#scp -P 22 myfile.gz remote_IP:/home/

 

FOLDER COPY

 

#scp  -r -P 22 /folder/name/* remote_IP:/home/

Loading