Day 2-some fun coding

download Day 2-some fun coding

If you can't read please download the document

Transcript of Day 2-some fun coding

  • 1. # {Root user} $ {Normal User}

2. pwd=Print working directory cd=Change directory vi=vim-editor wq=write and quite 3. Some simple command: To copy some file from one directory to another: cp /root/directoryname/filename /root/directorynamTo see history: history history |moreTo compress the file: gzip To uncompress the file: gunzip 4. To shutdown: init 0 shutdown -h nowTo restart: init 6 5. 1=safe mode (single user mode) or (maintenance mode)2=ma Networking hudaina aaru chai sabai huncha3=multiuser,networking and text base5=multiuser,networking,text base & graphical base6=restart0=shutdown 6. To add new Normal User: useradd passwd init 6 Now you can login as new normal user and password 7. To see ip address of an computer: ifconfig To change ip address of the computer:cd /etc/sysconfig/network-scripts/pwdlsvi ifcfg-eth0 and then write 8. BOOTPROTO=dhcp lai delete garne ani static write garneIPADDR=192.168.1.100NETMASK=255.255.255.0 & save it now 9. And then ifup eth0ifdown eth0ifup eth0ifconfig 10. To make network between vmware player and outside computer Go to VMSettingNetwork AdapterClick on Host-only:A private networkThen power on the virtual machine 11. Again Go to network propertiesChange adapter settingVMware Network Adapter VMNet1-Enable itGo to its propertiesGo to Internet protocol version 6(TCP/IPV4)Go to its propertiesNow change the IP address and click ok 12. Now go to command prompt Ping IP address of LinuxIf its pings...your network will be ready 13. To check weather the software is installed or not rpm -q rpm package name For example:rpm -q samba rpm -q http 14. To install software At first we have to mount our cdrom mkdir /mnt/nikeshmount /dev/cdrom /mnt/nikesh then after to mounting complete:cd /mnt/nikeshlscd Centos 15. LsLs samba * To install:rpm -ivh samba-3....click tabrpm -q samba To uninstall:rpm -Uvh samba-3...click tab