Archive for category Other

Linux command list for System Info

  1. pwd

    Prints the current working directory (Print Working Directory)

  2. hostname

    Print the name of the local host (the machine on which you are working). If you want to change the name of the machine, Use netconf (as root).

  3. id username

    Print user id (uid) and his/her group id (gid), effective id (if different than the real id) and the supplementary groups.

  4. whoami
    Prints your login name.
  5. date
    Print or change the operating system date and time. If you want to change the date and time to 2010-12-31 23:57 using this command:
    date 123123572010
    To set the hardware (BIOS) clock from the system (Linux) clock, use the command (as root) setclock
  6. who
    Determine the users logged on the machine.
  7. rwho -a
    (remote who) Determine all users logged on your network. The rwho service must be enabled for this command to run. If it isn’t, install “rwho”.
  8. time
    Determine the amount of time that it takes for a process to complete + other info. Don’t confuse it with thedate command. E.g. I can find out how long it takes to display a directory content using:
    time ls
  9. finger username
    System info about a user. Try: finger root
  10. last
    Show listing of users last logged-in on your system.
  11. history | more
    Show the last (1000 or so) commands executed from the command line on the current account. The “| more” causes the display to stop after each screenful.
  12. uptime
    Show the amount of time since the last reboot.
  13. ps
    (Process Status) List the processes currently run by the current user.
  14. ps axu | more
    List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process.
  15. top
    Keep listing the currently running processes, sorted by cpu usage (top users first). In KDE, you can get GUI-based Ktop from “K”menu under “System”-”Task Manager” (or by executing “ktop” in an X-terminal).
  16. uname -a
    (Unix Name with option “all”) Info on your (local) server. I can also use guname (in X-window terminal) to display the info more nicely.
  17. free
    Memory info (in kilobytes).
  18. df -h
    (Disk Free) Print disk info about all the filesystems (in human-readable form)
  19. du / -bh | more
    (Disk Usage) Print detailed disk usage for each subdirectory starting at the “/” (root) directory (in human legible form).
  20. cat /proc/cpuinfo
    Cpu info–it show the content of the file cpuinfo. Note that the files in the /proc directory are not real files–they are hooks to look at information available to the kernel.
  21. cat /proc/interrupts
    List the interrupts in use.
  22. cat /proc/version
    Linux version and other info
  23. cat /proc/filesystems
    Show the types of filesystems currently in use.
  24. cat /etc/printcap
    Show the setup of printers.
  25. lsmod
    (As root. Use /sbin/lsmod to execute this command when you are a non-root user.) Show the kernel modules currently loaded.
  26. set|more
    Show the current user environment.
  27. echo $PATH
    Show the content of the environment variable “PATH”. This command can be used to show other environment variables as well. Use “set” to see the full environment.
  28. dmesg | less
    Print kernel messages (the content of the so-called kernel ring buffer). Press “q” to quit “less”. Use less /var/log/dmesg to see what “dmesg” dumped into this file right after the last system bootup.

No Comments

How to install git on Red Hat Linux / Cent OS

Git is dependent on the follow libraries, make sure they are installed.

yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel

Curl will need to be installed from source. The current version from Red Hat/Cent OS doesn’t work correctly with Git.

tar xzvf curl-7.18.0.tar.gz
cd curl-7.18.0
make install

Next, make sure /usr/local/lib is in your, this is required for git-http-push to correctly link up to the Curl version you are installing.

vi /etc/

(Insert the following)

Save the file, then run:

Now download and install Git

tar xzvf git-latest.tar.gz
cd git-date
./configure --with-curl=/usr/local
make install

No Comments

What’s the difference between 301 redirects and 302 redirects [Quick Answer]

Quick answer: 301 – permanent redirect and 302 – temporary redirect.

No Comments

FOSFacebookBundle: “The Facebook user could not be retrieved from the session.” (a possible solution)

If you get the message below when you try to connect to your site via Facebook Connect,

The Facebook user could not be retrieved from the session.

You just need to change your localhost URL on your own hosts file that Facebook can give you cookie permission of which is blocked by default for localhost development.
To do that, just add a new line below to your hosts file; localhost.local
And do not forget to change your application settings at to allow your new application URL http://localhost.local/your_app/.

Thank you for reading.

No Comments

Overall Summary of my First Week on the New Job at Enuygun.Com

The end of the week showed up for me and I feel like writing about my firs week at Enuygun.Com. Firstly, I haven’t learn much about the company but I think its a kind of new but successful company. I’m a senior software developer here and we’re going to build applications, services, mobile applications and an affiliate system for all we can share the growth. We are using Symfony2 as PHP framework of which I had no idea at the beginning. For the first 2 days it was like what a horrible structure that everything is bundled and you need to create new bundle to use the other bundle. At least, that’s what I think it was. After a huge concentration on research and watching some tutorials about Symfony, I now can say that, it might be the best framework to be used to develop easily implemented bundles that could be used by many applications. It’s not that none of the other frameworks don’t have the ability but it is for me now that when I think about bundled or plug in based system development is Symfony.

All in all, although I did not have any clue about the technology that they have been using till now, I think I made a grate performance to figure out what is what, why it is used and how I can use things while I have my developer hat put-on. So, the thing is, is totally new for me and I feel like I’m going to be successful as I used to be on the previous companies. But I should note that, getting a job far away from your home is not the best choice. But it was a quick shoot. I hope I made a good decision.

Thank you for reading.

No Comments