Showing posts with label Embedded/Linux. Show all posts
Showing posts with label Embedded/Linux. Show all posts

Linux Line Feed? Carriage Return? Remove ^M

linux "^M" issue

If you look the shell script or code sent from Windows to the Linux server, you may find "^M" at the end of the line.

ex 1 )
echo test^M


ex 2)

#include <iostream>^M
#include <string>^M


Solve :

all remove ^M

 $ vi source.cpp
 
:1,$s/^M//g

^M : ctrl+N and ctrl+M


dpkg command (install / remove)

 dpkg

 - install .deb

    $ dpkg -i *.deb


 - check intalled .deb package

    $dpkg --get-selections | grep <pkgName>


 - remove .deb 
   * If it is installed through a deb file, it should be removed in order according to dependencies.

    $ dpkg -P <pkgName>-dev

    $ dpkg -P <pkgName>-dbg

    $ dpkg -P  <pkgName>



#dpkg #deb #install #remove #package #linux #embedded

chmod (change access permission)


chmod (change access permission)
- Used to change access permission(or file mode) to an existing file or directory.
(Only file owners or super users are allowed to change the mode.)
- mode option is specified as a character symbol or octal number.

Options and Symbols
  • the user to be changed(user target), the command to be performed (operating), and the permission to be set (access)
  • Multiple option are separated using commas (,)

  • options
    • -R
      Change the permissions of subdirectories and files (recursive)
    • the user to be changed
      • u
        abbreviation for "user", meaning file or directory owner
        g
        group owner
        o
        abbreviation for "others", meaning other users
        a
        abbreviation for "all", a combination of u,g,o (estimated to be all if no characters are used)
    •  the command to be performed
      • +
        add
        -
        remove
        =
        specify (Existing properties disappear.)
    • the permission to be set
      • r
        read
        w
        write
        x
        execute

Examples of frequently used options
+x
Add execution permission to all users (owners, groups, and others)
u+x
Add execution Permission to Owner
u-x
Remove the owner's execution permission
o-rw
Remove other users' "read and write" permissions
go=rw
assign "read, write" permissions to  groups and other users(remove if they previously had execute permissions)
u+x,go=rw
Add execution rights to owner and assign "read and write" permissions to groups and other users
a=rw
Assign "read, write" permissions to all users
g-w
Remove "write" permissions for group owners
g+w,o-x
Add "write" permissions to group owners, remove "write" permissions from other users


#chmod #permission #permission deny #linux #linux permission

VM VirtualBox Error: Call to WHvSetupPartition failed: ERROR_SUCCESS


Call to WHvSetupPartition failed: ERROR_SUCCESS (Last=0xc000000d/87) (VERR_NEM_VM_CREATE_FAILED).


Issue:
 Hyper-V


Solve :
Window + R -> CMD(administrator mode)
Input :
> bcdedit /set hypervisorlaunchtype off

Reboot your PC





#VM #VirtualBox #Error #WHvSetupPartition #Linux #Ubuntu #Hyper-V

How to install Linux(Ubuntu) in Windows10 (2/2)

Previous posting: How to install Linux in Windows10(1/2)

How to install Linux(Ubuntu) in Windows10 (2/2)

9. When the installation is complete, click Run.
    설치가 완료 되었다면실행을 클릭하세요.



10. after run, When you see the message "Installing. this may take a few minutes. WslRegister...... .Press any key to continue...", proceed to the next course.
    실행을 하였을 때 "Installing. this may take a few minutes. WslRegister...... .Press any key to continue..." 가 보이면 다음 과정을 진행하세요.





11. To use Linux in Windows, you must turn on features in "Turn Windows Features On". Click on the magnifying glass or white window next to the window logo at the bottom left, and then enter "Turn Windows Features On/Off" and run it.
    윈도우에서 리눅스를 사용하기 위해서는 "윈도우 기능 사용 켜기"에서 기능을 켜야합니다.
좌측 하단의 윈도우 로고 옆에 있는 돋보기 혹은 하얀창을 클릭 후, "Windows 기능 켜기/끄기를 입력 후 실행하세요.




12. In the "Windows Features" window, check the box in the "Windows Subsystem for Linux" section, click OK, and wait for it to take effect.
    "Windows 기능창에서 "Linux Windows 하위 시스템이라는 부분에 체크박스를 "체크"하고확인을 누른 후 기다리면 적용이 됩니다.


13.    After "Restart," click on the Windows logo in the bottom left to run "Linux"(Ubuntu) on "Recently Installed Apps."
    "다시 시작후 좌측 하단의 윈도우 로고를 클릭하여, "최근에 설치한 앱" Linux를 실행하세요.





14. When running, you can see that the installation is working properly, and then use it.
    이제 인스톨이 정상 진행되어 완료되면 사용할 수 있다.




#Windows Linux #Ubuntu #Linux #Windows10

How to install Linux(Ubuntu) in Windows10 (1/2)


How to install Linux(Ubuntu) in Windows10


1. Enter "Setting" (Right-click the Windows logo at the bottom left.)
    "셋팅"에 들어가세요. (왼쪽 하단에 윈도우 로그를 우클릭 하세요.)



2. Click "Update and Security" in the Setting screen
    설정 화면에서 "업데이트 및 보안"을 클릭하세요.



3. Click on "For Developers" in the left menu.
    좌측 메뉴에서 "개발자용"을 클릭하세요.




4. Then click on "Developer Mode" on the right-hand screen.
    그 후 우측 화면의 "개발자 모드"를 클릭하세요.
    




5. Select "Yes" when the message pop-up window appears.
    메시지 팝업창이 뜨면 ""를 선택하세요.




6. You will see the message "Searching for Developer Mode Package". please wait for it to complete.
    "개발자 모드 패키지 검색 중메시지가 보이면 완료될 때까지 기다리세요.    



7. after completion, enter the "Microsoft store". (If not on the taskbar, search as below.)
    완료된 후, "microsoft store" 에 진입하세요. (작업표시줄에 없다면아래와 같이 검색하세요.)




8. Click the magnifying glass in the upper right and search for "Linux" and download Linux that is suitable for you. (I downloaded "Ubuntu").
    오른쪽 상단에 돋보기 모양을 누르고 "Linux"라고 검색한 뒤 본인에게 맞는 Linux를 다운 받기 하세요.(필자는 Ubuntu를 다운 받음.)





Check until the next posting.
Please check the next posting !!!!
because it may not be executed if you proceed up to here.
다음 포스팅까지 무조건 확인하세요.
여기까지만 진행하면 실행이 안될 수 있어 다음 포스팅을 무조건 확인하세요.

https://kiwonlee23.blogspot.com/2020/06/how-to-install-linux-in-windows10-22.html


#Windows Linux #Ubuntu #Linux #Windows10

VirtualBox - The VM session was closed before any attempt to power it on.


VirtualBox - The VM session was closed before any attempt to power it on.

Issue: "The VM session was closed before any attempt to power it on."

Solution :


#VirtualBox #Error #The VM session was closed before any attempt to power it on.


Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore!

 🏙️ Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore! 🚨 Are you thinking about buying an apartment in 2025? 🏢  It’...