aliyev's notes

  • About

Ubuntu advices

Memory test, check, analyze on linux

November 14, 2014, by admin No comments yet

I know there are tones of information about how and what to use to analyze the memory usage on linux.

However I’m publishing some useful ones that can be helpful to start with:

Display amount of free and used memory

free -m

Display swap usage summary

swapon -s

Display user-process resource limits

ulimit -a

List processes sorted by memory usage

ps aux –sort -rss

mount: Cannot allocate memory

November 14, 2014, by admin No comments yet

Trying to mount -a on a linux system with windows share was giving me the following error

mount: Cannot allocate memory

The problem seems to be on Windows system where share is located. Quick and temporary workaround is to restar Lanmanserver service and retry mount -a.

Permanent fix that should help is to edit a registry setting and restart the service as below:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v Size /t REG_DWORD /d 3 /f
sc stop LanmanServer
sc start LanmanServer

How To search for an string in a file using grep

April 23, 2009, by admin No comments yet

grep searches the input files for lines containing a match to a given pattern list. When it finds a match in a line, it copies the line to standard output (by default), or does whatever other sort of output you have requested with options.

grep can simply be invoked: $ grep ‘STRING’ filename

Read more →

Setting the Date and Time in Linux

October 8, 2008, by admin No comments yet

Run the date command to make sure you have the correct time:

[root@server /root]# date
Thu Sep 20 11:00:06 CDT 2001
[root@server /root]#

If your timezone is correct but the date and/or time needs updating, the following commands will update the date and time. The second command is needed in order to push the date and time into the PC clock.

[root@server /root]# date 092011082001
Thu Sep 20 11:08:00 CDT 2001
[root@server /root]# hwclock --utc --systohc
[root@server /root]#

XMMS on Ubuntu

August 31, 2008, by admin No comments yet

I’ve finally got new hdd for my laptop. So I decided to dedicate myself on getting to know more about Desktop version of Ubuntu. Latest copy was installed successfully without any troubles except driver for Nvidia. But that was easily solved by downloading and installing latest driver.

Read more →

Linux file permissions

August 20, 2008, by admin No comments yet

The basics of file ownership and permissions on Linux. Learn to understand who are the owners of a file or directory, how the file permissions work and how you can view them, and learn how to set basic file permissions yourself.

Read more →

How to change a file’s owner and group in Linux

August 20, 2008, by admin No comments yet

< chown – change the owner of a file >

You can change the owner and group of a file or a directory with the chown command. Please, keep in mind you can do this only if you are the root user or the owner of the file.

Set the file’s owner:
$ chown username somefile
After giving this command, the new owner of a file called somefile will be the user username. The file’s group owner will not change. Instead of a user name, you can also give the user’s numeric ID here if you want.
Read more →

Block root access to SSH service

August 3, 2008, by admin No comments yet

SSH (Secure Shell) is a protocol for creating a secure connection between two computers.The secure SSH connection provides authentication and encryption. SSH also provides compression and is most common way for users and root to get connect to the server (Linux), the main reson behind blocking the root user is to allow the admin to login into the box with the default normal user and do the the administrator task using sudo, no direct root login.

1. vi /etc/ssh/sshd_config
3. Locate the parameter — PermitRootLogin yes
4. Change this to PermitRootLogin no
5. Save and exit
6. Restart your sshd by type sudo /etc/init.d/ssh restart

Linux Filesystem Hierarchy

August 3, 2008, by admin No comments yet

Here is a very cool and beautiful representation of the hierarchy which I found @linuxconfig.org site. The diagram below represents (part of) a Linux file system.

HowTo keep your Ubuntu up-to-date

August 3, 2008, by admin No comments yet

It is important to have the system updated, so that we have all the latest patches, security fixes and packages upgrades from the repositories.

First, navigate to: System –> Administration –> Software Sources

and check that all repositories are enabled.

Then, open the terminal: Applications –> Accessories –> Terminal
and type: (you need to provide the password here)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

With this you are done with the system update.

12

Categories

  • FreePBX
  • IIS
  • Misc
  • Nokia
  • Photoshop
  • Server 2003
  • Server 2008
  • Ubuntu advices
  • Ubuntu troubles
  • Uncategorized
  • vim
  • Windows 2003
  • Wordpress

Recent blog posts

  • Automatically Log off Disconnected User Sessions on Windows admin, September 15, 2020
  • Event ID 20069 – AT_KEYEXCHANGE admin, September 15, 2020
  • SharePoint Online: Adding Term Store Administrators admin, June 10, 2020
  • Sharepoint Online. Get storage use per site using powershell admin, June 8, 2020
  • Extract IP addresses from PCAP admin, May 19, 2020

This is widgetised area:
Footer › Column 1

This is widgetised area:
Footer › Column 2

This is widgetised area:
Footer › Column 3

Copyright © 2020 aliyev. All Rights Reserved. Cookie policy | Privacy policy