Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Wednesday, 30 September 2020

Steps for installing MyPaint on Ubuntu

 Detailed Instructions:

Step 1
Run update command to update package repositories and get latest package information.
sudo apt-get update -y
Step 2
Run the install command with -y flag to quickly install the packages and dependencies.
sudo apt-get install -y mypaint

Saturday, 4 July 2015

LINUX / UNIX COMMANDS FREQUENTLY USED

These are some of the frequently Used Unix Commands which may be of help to you. have a look
Starting and Ending
login: `Logging in'
ssh: Connect to another machine
logout: `Logging out'
File Management
emacs: `Using the emacs text editor'
mkdir: `Creating a directory'
cd: `Changing your current working directory'
ls: `Finding out what files you have'
cp: `Making a copy of a file'
mv: `Changing the name of a file'
rm: `Getting rid of unwanted files'
chmod: `Controlling access to your files'
cmp: Comparing two files
wc: Word, line, and character count
compress: Compress a file
Communication
e-mail: `Sending and receiving electronic mail'
talk: Talk to another user
write: Write messages to another user
sftp: Secure file transfer protocol
 
Information
man: Manual pages
quota -v: Finding out your available disk space quota
ical: `Using the Ical personal organizer'
finger: Getting information about a user
passwd: Changing your password
who: Finding out who's logged on
Printing
lpr: `Printing'
lprm: Removing a print job
lpq: Checking the print queues
Job control
ps: `Finding your processes'
kill: `Killing a process'
nohup: Continuing a job after logout
nice: Changing the priority of a job
&: `What is a background process?'
Cntrl-z: Suspending a process
fg: `Resuming a suspended process'

Commonly Used Linux Commands for you.
  1. Linux comes in several versions. The following commands will help you determine which Linux distro is installed on your host, what’s the version of your Linux kernel, the CPU model, processor speed, etc.
$ cat /etc/issue $ cat /proc/version $ cat /proc/cpuinfo
  1. Find the total amount of RAM available on your Linux box and how much is free.
$ free -mto
  1. The command cd.. takes you up one directory level but cd – will move you to the previous working directory. Or use the command pwd to print the full path of the current directory that you can copy-paste later into the shell.
$ cd – $ pwd
  1. The command history will show a list of all the recently executed commands and each will have an associated number. Use !<number> to execute that command again. Or, if the history is too long, use grep to search a particular command.
$ !<command number> $ history | grep <some command name>
  1. You can remove any particular command from the shell history by number.
$ history –d <command number>
  1. If you made an error while typing a command name, just enter the correct command name and then use !* to reuse all the previous arguments.
$ <command> !*
  1. Re-run a command but after replacing the text abc in the command with xyz.
$ ^abc^xyz
  1. This will list the size of all sub-folders of a directory in KB, MB or GB.
$ du –sh */
  1. A better version of the ls command that displays file sizes in KB and MB.
$ ls –gho
  1. You can use man <command> to learn more about the syntax of a command but what if you don’t remember the name of the command itself? Use apropos then.
$ apropos <search phrase>
  1. Compare the content of two text files to see what has changed.
$ diff wp-config.php wp-config.php.old
  1. Find lines that are common in any two text files.
$ grep –Fx –f file-A.html file-B.html
  1. Compare the content of two directories recursively.
$ diff –urp /old-wp-directory /new-wp-directory
  1. Find all files under the current directory that are larger than 10 MB in size.
$ find . -size +10M -exec du -h {} ;
  1. Find all files on the system that have been modified in the last 2 days.
$ find . –type f –mtime -2
  1. Find all files on the system that were modified less than 10 minutes ago
$ find . –type f –mmin -10
  1. Find all PHP files that contain a particular word or phrase.
$ find . -name “*.php” -exec grep -i -H “matt mullenweg” {} ;
  1. When copying or moving files, Linux won’t show a warning if you are overwriting an existing file. Therefore always use the –i switch to prevent overwrites.
$ cp –i abc.txt xyz.txt
  1. Backup the content of the current folder into a tarball file using gzip compression.
$ tar zcfv backup.tar.gz /wp-directory/
  1. Find processes with the highest CPU usage. Then use kill –9 pid to kill a process.
$ ps aux | sort -nrk 3 | head
  1. Execute the following command in your Apache logs directory to determine hits coming from individual IP addresses.
$ cat access.log | awk ‘{print $1}’ | sort | uniq -c | sort –n | tail
  1. Monitor hits from Google bots to your website in real-time.
$ tail –f access.log | grep Googlebot
  1. To find all files and web pages on your site that return a 404 error, run the following command in the Apache logs directory.
$ awk ‘$9 == 404 {print $7}’ access.log | uniq -c | sort -rn | head
  1. Find the 100 most popular pages of your site using Apache server logs again.
$ cat access.log | awk ‘{print $7}’ |sort |uniq -c |sort -n |tail -n 100
  1. Quickly find and replace a string in or more files.
$ find . -type f -name “*.php” -exec sed -i ‘s/wordpress/WordPress/’ {} ;

Sunday, 2 November 2014

To know whether my Linux system is 32 bit or 64 bit ?

Generally, during any software installation, one gets puzzled regarding the system architecture i.e., whether the PC/desktop is 32 bit or 64 bit build...

Simplest way to know is here.

Step1: Open the terminal.

Step 2: type uname -a
Result for 32-bit Ubuntu:
Linux discworld 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386GNU/Linux
whereas the 64-bit Ubuntu will show:
Linux discworld 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 x86_64 x86_64x86_64 GNU/Linux

Identify whether it is i386 or x86_64; correspondingly it is 32 bit or 64 bit build architecture, respectively.


Note: There are many other alternative ways in Linux, to determine the system architecture; but, this is probably the simplest way.
How to install Wine in Ubuntu or Mint Linux?

Q:Why Wine?
A:If you want do run windows platform-based applications (i.e., with extension .exe), then we should install WINE in linux.
A: If the apps which are available over windows platform, are the only requirements making you to compromise with windows, then WINE is the solution. It is a free software under GNU License.

Here is the shortcut for the installation of latest stable version of WINE i.e., WINE 1.6

Step 1: Open the terminal, and type the following commands
Step 2: sudo apt-get update
Step 3: sudo add-apt-repository ppa:ubuntu-wine/ppa
Step 4: sudo apt-get update
Step 5: sudo apt-get install wine16


Note: Please restart the system for effective installation.