Linux Basic Commands

  1. Contents of a file: ls
  2. Content list with long format: ls -l or ls -l -h human readable or concat the both ls -lh.
  3. Change directory: cd DirectoryName
  4. Move to the upper directory: cd ..
  5. Switch to previous directory : cd -
  6. Change to home directory: cd ~
  7. Go to full path: cd /Home/Documents/Pitctures/MyPictures
  8. Tilde (~) for home directory : MyPc:~/Documents$ cd ~/Videos
  9. Clear screen: clear
  10. Show different drives in the computer (List block devices): lsblk
  11. Opening a file in the text editor :
# open in nano
nano filename

#open in xed editor
xed filename
  1. Root directory: cd /
  2. Press Tab to autocomlete.
  3. Create a directory : mkdir blah
  4. Remove a directory : rmdir blah
  5. Creating a blank file : touch something.txt 14.1. Creating multiple files at once: touch f1.txt f2.txt f3.txt f4.md f5.md
  6. Printing something in terminal : echo hello
  7. Create a file with text: echo "blah blah" > blah.txt
  8. Show contents of a file: cat blah.txt
  9. Copy file : cp /source/filename.ext destination/filename.ext
# note: I am currently in the `Desktop` directory
# copy `blah.txt` from `Desktop` to `Documents` directory

cp blah.txt ~/Documents/blah2.txt

# copy `blah.txt` from `Desktop` to `Documents` directory with changed filename

cp blah.txt ~/Documents/blah2.txt 

# it will copy `blah.txt from `Desktop` to `Documents` directory with changed file name `blah2.txt`
  1. Copy all files (. allfiles.allextensions): cp *.* ~/Documents

    [Read More]

How to Install DotNet SDK In Ubuntu Based Distros?

My Distro

I am using linux mint 22.1 which is based on Ubuntu 24.04.

Straightforeward command

sudo apt-get update

sudo apt-get install -y dotnet-sdk-9.0

But…

I have tried to run this command sudo apt-get install -y dotnet-sdk-9.0 but unfortunately I got no success. I have found that, this command works only with Ubuntu 24.10. For Ubuntu 24.04 I need to use different approach.

Uninstall prior version if exists

sudo apt-get remove dotnet-sdk-8.0

Now, run these commands in a sequence:

[Read More]